• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

(Trigger tutorial) How to make -agi max commands!

Level 2
Joined
Jun 9, 2007
Messages
5
The first thing youl have to do is to pop up your world editor, a realy hard request. Now you have to open the trigger-editor and make a new trigger.
Now right-click on Events and then scroll to 'Unit-A unit enters region'.
You will notice that 'region' is marked red, which means that you have to select a region, which in this case should be the whole playable map arena.
Then go to conditiones and make a new one which says: '(owner of (triggering unit)) = player 1 (red)' and make an other one that says: (triggering unit is a (hero)) = true'
then make a new aktion that says: 'set var= entering unit' In the red var place you have to fill in a var which i named 'hero' (you prbly. have to make one)
Now that trigger should look like this:
Events:
Unit enters (playable map arena)
Conditiones:
(triggering unit is a (hero)) = true
(owner of (triggering unit)) = player 1 (red)
Aktiones:
set hero = entering unit

This you'll have to do for every player you want to be able to use this command. (Each in a different trigger, of course, and don't forgett to make diferent vars for each hero!!!)

Now you can programme the comands for which you need a diferent trigger, too.This should look like this:

Events:
Player - Player 1 (red) types a chat message containing '-agi max' as a perfect match.
Conditiones:
-
Aktiones:
Set 'AIinteger' = ((triggering player) current gold)
set 'AIinteger' = (AIinteger/ 100)
Spieler - Add (-100*AIinteger) to (triggering player) current gold
Hero - modifi agility of 'hero': add AIinteger

AIinteger is a var you'll have to make, but the hero var is one that you alreadey have. You have to do this for each plaver and each attribute, but remember, a different player requiers a different hero var, so for example player-2-hero-var I named hero2 and used that var instead of hero at player 2's trigger!!!

Heres a link that shows that the system works:
http://rapidshare.com/files/58441469/agistrintmax.w3x.html

And please think about this thread again, it may be usefull for some people if they make maps, gravejard ain't the right place for this!!!
 
Last edited:
Top