PDA

View Full Version : Getting a location to follow a unit


JTG2003
08-10-2004, 6:10 PM
I have an RPG. In the beginning you can choose a character. You will only have 1 of that character through the whole game.

I set up a script that looks like this (for player 1):

Conditions:
Always

Actions:
Center location labled 'player 1' on Firebat at Anywhere.
Center location labled 'player 1' on Marine at Anywhere.
Center location labled 'player 1' on Zealot at Anywhere.
(etc going through all the heros)
Preserve Trigger


This worked only when you first received the hero, then the location stayed there.

On second thought, the location may have stuck to 'anywhere' but..I dont know. In any case, telling it to center in all those locations i think was fine because you only have 1 of those units anyway..so..wont it only center on the unit you have?

Any help is appreciated. Thanks, Jeremy

Atlantis75
08-10-2004, 6:18 PM
You've got to remember that with preserve trigger that computer assesses the trigger once every second, so it is trying to bounce this trigger all around the map when the required units for the action arnt there(since you told the computer there are multiple units). Also about this once every second thing, do you have any triggers with the wait action? At first the perfect way to delay and is to put in a wait action, or at least it seems that way. When i first used it i was horrified. Waiting stops EVERY tigger in the ENTIRE game until the wait is over so if you do have a wait you are going to learn how to uses switches and score settings that keep track of time.

eNWolf
08-10-2004, 6:22 PM
fist have a location above each hero and use this

conditions- player 1 brings atleast 1 unit to select zealot
actions- give all zealot at location zealot to player 1
center location zealot on all zealot at anywhere.
preserver trigger
This should work. if it doesnt, just let me know and i will think of a different solution. do this for each hero and for each player. but you should only have one location on each hero.

and try hyper triggers.

JTG2003
08-10-2004, 6:56 PM
eNWolf ... That doesnt make any sence.
This has nothing to do with selecting and giving units.

In the start, you move 1 civil to a unit you want. The civil dies and your unit is spawned in the map. I don't really know where you were going with that. I am using hypertriggers, and Atlantis75, I don't have any waits. I use switches all the time. I think thats what Im gonna do if no one here can help me.
[player 1]

Conditions:

If Zealot is set

Actions:

Center location player 1 on zealot at anywhere.



This would be copied for every unit on player 1, then for every player.

Only another 48 triggers. ::rolls eyes::