Heroes V map editor questions

Maps and the art of mapmaking.
Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 03 Jun 2009, 18:10

When you see xxx=yyy in the function description it only means that yyy is a value by default for parameter xxx, so if you ommit it the game will decide that xxx = yyy. So instead of

MoveCamera(24, 152, 0, zoom = 50, pitch = pi/2, yaw = 0, noZoom = 0, noRotate = 0);

you should either write

MoveCamera(24, 152, 0, 50, pi/2, 0, 0, 0);

or simply

MoveCamera(24, 152, 0);

However, I recommend that you use this values:
MoveCamera(24, 152, 0, 0, 0, 0, 1, 1);

So the camera won't rotate and pitch and just move to the point.

User avatar
Belchior
Peasant
Peasant
Posts: 57
Joined: 17 May 2009
Location: Finland
Contact:

Unread postby Belchior » 04 Jun 2009, 14:07

on early answer, when i asked how make "got ya" monster attack script, that hidden ambush thing.. well when i touch region again it will start combat again so i how the hell i can stop trigger?
function ambushguardsdefeated(h,rst)
--This function is called after the battle
if (rst~=nil) then
--hero won, this check is _essencial_
MessageBox("Maps/SingleMissions/Demon Urgash/hiddenfight1.txt");
GiveExp(h,10000);
end;
end;

function myambush(h)
MessageBox("Maps/SingleMissions/Demon Urgash/hiddenfight2.txt");
StartCombat(h, nil, 4, CREATURE_ARCH_DEMON, 80, CREATURE_ARCHDEVIL, 100, CREATURE_SUCCUBUS_SEDUCER, 150, CREATURE_ARCHDEVIL, 100, nil, "ambushguardsdefeated", nil, not nil);
end;

Trigger(REGION_ENTER_AND_STOP_TRIGGER,"ambushregion","myambush");

Franzy
War Dancer
War Dancer
Posts: 362
Joined: 07 Sep 2007
Location: Moscow, Russia
Contact:

Unread postby Franzy » 04 Jun 2009, 22:49

To stop a trigger, simply write

Trigger(YOUR_TRIGGER_TYPE,"yourobject",nil)

In your case you should write

Trigger(REGION_ENTER_AND_STOP_TRIGGER,"ambushregion",nil);


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 7 guests