- Joined
- Feb 28, 2008
- Messages
- 84
looking for a trigger that is like Final Fantasy Forever, were you walk around and your party is sent into a random encounter,
I've found one on this site but it is a timer counting down and is not what i am looking for, witch is this one below:
http://www.hiveworkshop.com/forums/triggers-scripts-269/random-encounter-system-158889/
i found this on another website but don't under stand it, anyway someone could trigger it for me? or see if it would work for different regions.
I've found one on this site but it is a timer counting down and is not what i am looking for, witch is this one below:
http://www.hiveworkshop.com/forums/triggers-scripts-269/random-encounter-system-158889/
i found this on another website but don't under stand it, anyway someone could trigger it for me? or see if it would work for different regions.
event-
time - periodic event (every 1 seconds)
conditions-
integer comparison - Math - random Intiger between 1 and 100 is less than 5 equal to true
actions-
run the random encounter...
this will mean that every second there is a 5% chance that they will have a random battle (ie. on average one battle every 20 seconds). Then just dissable/reinable this trigger whenever you need to.
But I would suggest you make one which only works if you are moving - that one in fff is a pain in the ass how it works when you're just sitting there doing nothing... Try the same thing but add in another condition that-
(heroPos is just a point variable, make it an array if there is more than one player)
events-
same as above
conditions-
same as above
actions-
if (HeroX is not equal to (unit - position of (the players unit)) then
do the encounter stuff
else
the player is in the same position as they were a second ago, so don't run the trigger
This way, encounters will only occur if your hero has moved at all over the last 1 second - working like it does in most other random encounter games. Make the trigger occur less often to reduce lag (although this shouldn't lag it much at all, unless there is lots going on when it might be better). If you make it run once every 10 seconds, with a 50% chance then it won't make much lag at all and will help to reduce the chance of players getting back from a battle and going straight back into another one - and still retain the average of 1 battle every 20 seconds.
I would suggest values like once every 3 seconds with 15% chance - that should produce a nice result.