Staredit Network

Staredit Network -> UMS Assistance -> Weapon Changing System Prob
Report, edit, etc...Posted by SomeIdiotNerd on 2006-10-22 at 14:46:14
Mmmmk i've been trying to make a new game for the horror theme this month, the theme goes that you are a vampire and you must take over all the cities before reinforcements come. i wanted to give Dracula (you) multiple abilities. So i used the method of a Defiler gunner system, and a gateway system. What i'm trying to do is that when you make a zealot or w/e in the gateway it will change the weapon or attack of Dracula so that when he uses the gunner system (dark swarm) it will attack in a different manner. Here are my trigs so far. Reminder: these triggers for now are only displaying what the weapon does, this is a test map.


Trigger
Description:
This is the startup Trigger, so that when the game begins it will automatically start at the first weapon
Players:
¤ Player 1
Conditions:
¤ Deaths(CurrentPlayer, Exactly, 0, AnyUnit);
Actions:
¤ SetDeaths(CurrentPlayer, SetTo, 1, Independent Starport);
¤ SetDeaths(CurrentPlayer, SetTo, 1, Nuclear Missile);



Trigger
Description:
This is the first weapon "blood lust"
Players:
¤ Player 1
Conditions:
¤ Deaths(CurrentPlayer, Exactly, 1, Independent Starport);
¤ Deaths(CurrentPlayer, Exactly, 1, Nuclear Missile);
¤ Bring(CurrentPlayer, Exactly, 1, Unclean One Defiler, Anywhere);
Actions:
¤ DisplayText("Blood Lust Selected
¤ SetDeaths(CurrentPlayer, Subtract, 1, Nuclear Missile);
¤ PreserveTrigger();


Theres 3 weapons or attacks, and the last thing is to change into a bat "flying dracula." However i'm not going to display the other ones because it is unnecessary. It's the same thing just a different display and a different unit triggers it.


Trigger
Description:
Create a Zealot, sets the death counts so that the display will come on.
Players:
¤ Player 1
Conditions:
¤ Bring(CurrentPlayer, Exactly, 1, Zealot, select weapon);
¤ Deaths(CurrentPlayer, Exactly, 0, Nuclear Missile);
Actions:
¤ SetDeaths(CurrentPlayer, SetTo, 1, Independent Starport);
¤ SetDeaths(CurrentPlayer, SetTo, 1, Nuclear Missile);
¤ KillUnitAt(1, Zealot, select weapon, CurrentPlayer);
¤ PreserveTrigger();


I am perfectly ok with trying a new approach to these triggers as long as it works, and you can define it for me.

Brief info on the trigs: right now all i'm trying to do is create a display for now of what the attack does, The one i'm currently using is an automatic trigger that will simply power up the players units near Dracula.

The first trigger is the startup trigger, because in the start of the game there are 0 kills of any unit, so it will automatically set death counts to 1 for Independant starport, the weapon select trig, and 1 for nuclear missle, display trigger so that the trigs don't keep displaying what the trigger does do to the hyper triggers and the preserve trigger.

For some reason though the display trigger isn't working.

the second trigger is the display trigger it will display what you are using in this case "blood lust" The trigger will display what it's doing and automatically subtract the death count for Nuclear missle, so that it will not display the description a second time innless you create a new zealot, which is explained in the last trigger.

The third trigger shows that when you create a zealot, you must have 0 Nuclear missle Death counts, which was subtracted in the before trig, and you must have a defiler, dracula, and it will automatically set up the display again, but for some reason the only thing that works in this trig, is killing the Zealot after it is made.

Note: i am using hyper triggers.


If you have any reason why this doesn't work, or another way to approach this please tell me




Report, edit, etc...Posted by Zeratul_101 on 2006-10-22 at 15:14:51
at first glance, i don't see anything wrong with it. i suggest doing a condition check. where you take your malfunctioning trigger in question(#2 in this case), copy it, replace all the actions with a defeat trigger, and uncheck all the conditions except one. everytime you perform the nessecary course of actions and you are defeated, it means that that condition is working. after that, uncheck the only checked condition and check another condition. repeat until you've tested all the conditions.

ps i see one 'weak' spot in your triggers - the 'kill unit' action. although i don't think its the cause of your problem.
Report, edit, etc...Posted by xmrxsiegecopx on 2006-10-22 at 15:25:09
The only problem I can see with your triggers is that the "Display Text" action in the second trigger is improperly typed out (It's missing the "); at the end). Also, make sure than the 'Always Display" textbox is checked.
Report, edit, etc...Posted by SomeIdiotNerd on 2006-10-22 at 15:44:53
Thx i'll try that

btw: i used SCXE to write the triggers i just used starforge to copy and paste tongue.gif .
Next Page (1)