| 10-20-2006, 03:56 AM | #1 |
Ok, I jsut folowed the tuorial on how to get host as a player variable. And i want to use it In my kick trigger. My variable is player type named Host jass code is ok. And the custonscript trigger is ok too. My problem is that it seems that player variables seems not working in event like : Player - A player write a message containing exact match. And for the poalyer i cannot use the host variable. Is this normal? Because I tried to use it somewhere else inActions and everything is ok ;S thank you for help! |
| 10-20-2006, 04:05 AM | #2 |
You have to make sure that the host variable is initialized and is assigned the value of the player before registering the event. The event registers the value assigned to the variable, so which ever value is stored in "Host" at the time it's registered is the player that's registered for the event. |
| 10-20-2006, 12:48 PM | #3 |
Try setting the host variable at map initialization and then simply adding the event to the trigger in question then. Once the variable is initialized, you can then use that pointer in trigger events. |
| 10-20-2006, 12:52 PM | #4 |
You can do: Trigger - Add Event after setting the variable, or you can just add events for all players and add a condition to check if the triggering player is the host. |
