| 07-16-2003, 04:33 AM | #1 |
hiho...im working out the triggers for a 'mini-game' type thing which could go into a larger RGP type map. The idea is that the player encounters a bunch of kids who want to play hide and seek, then they all run in random directions (i.e move to a random point in the surrounding region) and if you walk up to the right kid (ie the one that initially approaches and talks to the player) then you get a little prize. here are my problems : 1) random number selection - i have it so that it picks a random kid from the group of kids to be the one with the prize, but it always picks the same kid. also, the paths the kids run along seem to repeat a little after trying it out a few times. 2) i used the move region command so that once the kids stop running, i move the trigger region for the prize to the position of the prize kid. but the region never moves from its orginal position. 3) last of all, at the end when you get the prize, sometimes the item doesnt appear at all, and when it does its always the same item (i also tried to make it random) ps. once i have the main triggers set up i want to make it so that each kid gets a little region so if you walk up to the wrong kid then the game of hide and seek is over and you lose. i wanted to use the 'unit comes within range of unit' event but that doesnt work for unit variables set after map initialization :( ) i attached the map for reference (i dont care if ppl take the idea etc) |
| 07-16-2003, 12:05 PM | #2 |
1) Dont use test map. Load up the game normaly to test. If you have changed the setting off fixed random seed we have heard this still uses a fixed seed. 2) Dont move regions. This causes all kinds of problems. Use range to unit or something elce to fire your trigger. If the units are created after the map starts then use create trigger to deal with this. We have never used this so we dont the details about it. You may also be able to find a way to do it with a unit array depending on how your map works. 3) Put a wait .5 game time seconds at the start of the trigger. This should fix the no item problem. Same fix as #1 for the random problem. We didnt look at your map but we hope this helps. |
| 07-16-2003, 04:07 PM | #3 |
Thanks for your tips Hive. It works pretty well now. I even added an option for playing over again if you lose. If anyone is interested, here is the working file : |
