ubi.com    Forums  Hop To Forum Categories  Might and Magic  Hop To Forums  Might and Magic Maps and Mods    Help with scripts

Moderators: Mana_SG
Go
New
Find
Notify
Tools
Reply
  
  Login/Join 
Posted
In anticipation of the ability to create custom campaigns, I've started building scenario maps.

Unfortunately, I'm unable to get scripting to work (at all). The maps are NOT multiplayer. All the documentation that comes with the editor tells you what each script does, but not practical aplication (like telling a person what a steering wheel and brake pedal are, but not saying anything about how to actually drive).

Her is my latest attempt... it, like all the rest, give me a 'function not defined error', and have no effect at all when the specified hero enters the region.


SetPlayerStartResources(1, 10, 10, 5, 5, 5, 5, 1000);

function GiveTroops ()
if GetCurrentPlayer () == PLAYER_1 then
MessageBox("Maps/The Rise of a Nation bin/scen_1_intro.txt");
Trigger(OBJECT_TOUCH_TRIGGER, "region1", nil );
end;
end;


Can someone please tell me where I can learn how to use this language, pref. with examples on usage?
 
Posts: 3 | Registered: Tue January 30 2007Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
You can try the basics of Heroes V scripting from this site. If you have HoF, you perhaps won't get all samples running since some commands (like transformtown) have changed.
 
Posts: 681 | Registered: Fri February 27 2004Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
I've created a scripting tutorial over at GotP you'll have to log in first but here it is: http://gotp.jconserv.net/viewtopic.php?t=91
 
Posts: 4 | Registered: Thu November 16 2006Reply With QuoteEdit or Delete MessageReport This Post
Posted Hide Post
The "function not defined" error given by the map check function of the editor is meaningless. It ALWAYS shows all functions as not defined. You can ignore it.

The real test of your functions is to activate the console. (The details can be found on Celestial Heavens map making forum.) Then, use the game to create and run your map. Turn the console on and see the errors it reports. You must make note of the errors, then close the game and go back into the editor and change the script. You must repeat this process until the console no longer shows any errors.

Once you can get your map to load and run without any initial compilation errors, you must run around with a hero in the game and test each function. Again, use the console to what went wrong if the function does not give the results you desire.
 
Posts: 8 | Registered: Thu June 14 2007Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

ubi.com    Forums  Hop To Forum Categories  Might and Magic  Hop To Forums  Might and Magic Maps and Mods    Help with scripts

Terms of Use

Privacy Policy