Skip to content
User Avatar
#2068
Auto-translated
Jack_of_shadows
SetObjectiveState ( "obj3",OBJECTIVE_COMPLETED);
PlayVisualEffect('/Effects/_(Effect)/HolyWord.xdb#xpointer(/Effect)', 'necr1', '', X, Y, Z, 0, 0);
sleep (5);
Instead of X, Y, Z, you need to choose an offset to your liking; you can set Z to 5-6 right away. And you will probably need to increase the sleep time several times, as the animation is quite long.

Thank you very much.

And can I ask another question?

The MessageBox function absolutely refuses to work.

function Question ()
MessageBox("Maps\Multiplayer\Vostok\Question.txt");
Trigger(REGION_ENTER_AND_STOP_TRIGGER,"reg_1","Question",nil);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER,"reg_1","Question");

The region is specified correctly; when entering it, the hero stops, but the message is not displayed. The path to the text file also seems to be specified correctly; at least, this file is in the root of the map in Unicode encoding. Can you tell me what the problem might be?



Added 1 hour 18 minutes ago
Oops, sorry, I figured it out). I typed the slashes in the wrong direction... Now there's another problem: after reading the forum, I wrote the following script...

Function Question ()
QuestionBox("path to file","yes");
end;
Trigger(6,"reg1","Question");

function yes ()
local gold = GetPlayerResourse(1,6);
if gold >=3000 then
SetPlayerResourse(1,6,GetPlayerResourse(1,6)-3000)
SetObjectOwer("gar1",PLAYER_1)
else
MoveHeroRealTime("Diraya",75,25,0)
end;
end;

Please tell me, newbie, how to reset the trigger? Where should I insert Trigger(6,"reg1","Question",nil)?;

P.S. sorry for not following all the spacing in the script; I'm just writing from my phone, looking at the monitor, and I don't have the ability to simply copy and paste the text

Statistics

Welcome our newest member: leyu