| 12-23-2002, 12:51 PM | #1 |
Ok, I hope you're all willing to help the newbie here ^^. I'm making an RPG, and as a semi-novelty, you choose your hero by possessing it. Anyway, the problem I'm having is having an event/condition that detects when a paticular unit has been posessed. For example, I want that when the unit becomes possessed, a text message pops up saying 'You have selected *selected unit*'. The problem I'm having is that, although I can detect when any unit has been possessed, I can't tell what unit has been possessed. It feels like it should be easy and my nose is right over the right answer... Anyway, can anyone help me? Also, if it is of any use, I know the following: - When a unit possesses something, it is considered dead. - When a unit is possessed, it is not considered dead. - The possessed unit is *not* considered to kill the possessor. - Unit Variables do not carry over when Possess is cast. - A possessed unit is not considered to be entering the region it is possessed in. Thanks! :D |
| 12-23-2002, 04:49 PM | #2 |
Can't you just set it so that if the player owns any unit in the area other than the possessor, it will move that unit away and display a text message? |
| 12-24-2002, 02:07 AM | #3 |
I suppose. I figured I could probably do something with an 0.01 periodic timer, I was just hoping there was an event for it. It seems... cleaner. But thanks anyway, I guess I'll do the periodic one. |
| 12-24-2002, 03:05 AM | #4 |
There is an event, unit is ordered targeting a unit (or something like that) and there should be a unit thing that is "target unit of issued order" that should get the effect you want. |
| 12-24-2002, 05:29 AM | #5 |
Which event are you using now? Just add a condition checking the player/unit. |
| 12-24-2002, 06:15 AM | #6 |
Guest | Events: Peridical Event: Every 0.1 seconds Condition: Bootlean: Random Unit From Unit Group (all units owned by player#) is equal to a hero. Actions: Game Text: Display (You selected [unit matching condion[Random Unit From Unit Group (all units owned by player#) is equal to a hero]. Of corse this only works if you have only one unit. WAIT!!!!!! YOU CANT POSSESS HEROES! THe peeps in ur RPG are heroes right? If they are, make a double of each one, and put those for possement. When the trigger above goes off just add. Replace [unit matching condion[Random Unit From Unit Group (all units owned by player#) is equal to a hero] with [hero] Just change the condition and ur good to go. |
| 12-24-2002, 06:58 AM | #7 |
a 0.01 periodic event will lag the hell out of your map. I advise not using anything lower than a 1.0, and if its gonna be a bnet game, then 2.0 will work since fast game speed almost doubles the speed of the game. |
| 12-24-2002, 08:02 AM | #8 |
You could use "Unit owned by player dies". The possesing unit dies, the trigger starts and moves the possessed unit away, then it turns the trigger off. That should do it. If your gonna do periodic, then it won't cause too much lag as long as you plan to turn it off after its execution |
| 12-25-2002, 07:25 AM | #9 |
Thanks for the helps guys, I got it eventually. Also, Spectre, the term 'heroes' was used loosely, they're not technically heroes (although they become heroes later). Anyway here's the trigger I eventually used (It's not as efficient as I'd like it to be, since I needed to make one for each player, but it works): http://syt.webkore.net/images/0001.jpg |
