Staredit Network

Staredit Network -> UMS Assistance -> Equipping Weapons Help
Report, edit, etc...Posted by crazy_monkee on 2005-07-15 at 17:21:28
Hello, i am making a map called Doom 4 - Again

i have a system that when you put a weapon, lets say shotgun(firebat) to location equip, it moves to what weopon i am holding now. which is a pistol(marine).

i am having trouble using the 'move location' trigger

i want the location to follow wherever a marine follows so that when he uses a shotgun(firebat), the item can switch to where the marine was. my triggers are...



Trigger
Description:
The Location Mover
Players:
¤ Player 1
Conditions:
¤ Always.
Actions:
¤ Center location labelled 'Testing' on Terran Marine owned by Player 1 at 'Testing'


this is the other one i use


Trigger
Description:
Marine to Firebat Switch
Players:
¤ Player 1
Conditions:
¤ Player 1 brings exactly 1 Terran Firebat to 'Start Off'
Actions:
¤ Move 1 Terran Firebat for Player 1 at 'Start Off' to 'Testing'
¤ Center location labelled 'Testing' on Terran Firebat owned by Player 1 at 'Testing'
¤ Move 1 Terran Marine for Player 1 at 'Testing' to 'Gun Come Back'


And the Final one i used



Trigger
Description:
Firebat to Marine Switch
Players:
¤ Player 1
Conditions:
¤ Player 1 brings exactly 1 Terran Marine to 'Start Off'
Actions:
¤ Move 1 Terran Marine for Player 1 at 'Start off' to 'Testing'
¤ Center location labelled 'Testing' on Terran Marine owned by Player 1 at 'Testing'
¤ Move 1 Terran Firebat for Player 1 at 'Testing' to 'Gun Come Back'


The problem is that when i move, i dont think the location follows my marine when i start off, because when i move around, and i bring my firebat to location 'Startoff', it goes to 'Testing' but the location is where i originally put it on the map. Therefore, the location must not be following the marine for player 1. I would be grateful if you would help me on this censored.gif problem.
Report, edit, etc...Posted by UED77 on 2005-07-15 at 17:28:13
The "Preserve Trigger" action must be included for all of these, as without them, all of these can only execute only one time.

If the triggers are preserved, loc("testing") will always follow the Marine, provided P1 has only one Marine on the map. Without it, it just centers it once, and then the first trigger is never executed again.

UED77
Report, edit, etc...Posted by slayer766 on 2005-07-15 at 17:31:50
It doesn't look like that you are using preserve trigger at the end of your triggers.

UED77 lol you beat me to it. sad.gif lol
Report, edit, etc...Posted by crazy_monkee on 2005-07-15 at 17:47:04
Thanks a lot, it works, but the trigger activates too slowly, so when you equip firebat while your moving, it doesnt work. what should i do to fix this?
Report, edit, etc...Posted by slayer766 on 2005-07-15 at 18:00:27
Add Hyper Triggers. This means to give 3 seperate triggers to a player with no triggers in it and do this:
Trigger
Description:
Unused Player
Conditions:
¤ Always
Actions:
¤ Wait 0 milliseconds
¤ Wait 0 milliseconds
¤ Preserve Trigger


Just copy wait 0 milliseconds as much as you can until you cant anymore and add the preserve trigger. Then copy the whole trigger 3 times.
Report, edit, etc...Posted by TDT-DaRkFiRe on 2005-07-15 at 18:00:37
Maybe make the ''tesing'' location bigger, or move the firebat from ''anywhere'' to ''gun back''
Report, edit, etc...Posted by UED77 on 2005-07-15 at 18:04:41
Well, first of all, I just realized, that if your Firebat is "equipped", there is no trigger that centers the location on it. By your current method in Trigger 1, loc(testing) will center on the Marine at loc(testing), but if there is no Marine present, it will center itself at loc(testing), effectively remaining in the same place.

You would need to use death counters to keep track of which unit the player is using. Set P1 deaths of "Data Disc" (or some other unkillable unit) to 1 if you just switched to a Marine, and this same counter to 2 if you just switched to a Firebat.

When P1 deaths of "Data Disc" is 1 (== you are using a Marine), center the loc on the Marine. When it's 2, center it on the Firebat.

Also, I noticed that the Center Location actions you have in Triggers 2 and 3 are redundant... especially since you wish to remove the unit it has been centering on previously, if you move it onto the newly-teleported unit, it increases the chances of the old unit being stuck outside of the loc(testing)...

If you are dissatisfied with its speed, you might need hypercheck (or "hyper triggers"). Just goto an active player that uses no waits, and create a trigger with
Cond: Always
Act: Wait 0, and copy this 62 times to make a total of 63. Then put a "Preserve Trigger" at the end.
Copy the entire trigger two times to make three.

And you can enlarge the location. This was one of the first things I meant to say, but it got overwritten during the typing up of this reply. Da-Darkfire's post reminded me of this happy.gif

UED77
Next Page (1)