Toggle shoutbox
Shoutbox
|
Turn Events
Started by dlamey8015, Jun 11 2014 11:36 PM
3 replies to this topic
#1
Posted 11 June 2014 - 11:36 PM
I was just wondering if it was possible to make a turn event occur a set number of turns after another event occurs.
#2
Posted 12 June 2014 - 12:28 AM
Umm..... I don't really know. I want to say you can't, but you might be able to do something with conditionals....
The only way I can see it happening iswith my small knowledge, you have an event (now known as event 0xYY) that happens on turn 5, 6, 7 and so on, with the same event ID. Then you set a condition that event 0xYY only takes place if event 0xZZ has been activated, and make it so that event 0xYY hasn't been activated so that it checks again next turn. The problem is that you don't really know how many turns it will happen after, since someone could activate event 0xZZ on turn one, making him wait 5 turns, OR someone could activate it on turn 8, so event 0xYY would never happen (in theory you could just keep going until turn 99 though).
I'm guessing this other way won't work for you, but if you're talking about two turn events you could just make two separate events, say one on turn 2 and one on turn 7 if you want 5 turns to pass between them.
The only way I can see it happening is
I'm guessing this other way won't work for you, but if you're talking about two turn events you could just make two separate events, say one on turn 2 and one on turn 7 if you want 5 turns to pass between them.


This won't be removed until Chile wins the World Cup - Started 24/06/12
BTW, I take map requests if anyone wants to make one XD, just send me a PM and I'll most likely accept. If you wanna see some of previous work you can visit my gallery here, I'd skip to the end because I've improved alot XD.
#3
Posted 12 June 2014 - 06:12 AM
I'm not sure what Snow was saying but I'm guessing it was something like
event A happens turns 1-255
event B happens whenever
event A:
if event B has happened
if event ID 1 has not been triggered
set event ID 1 to triggered
else event ID HAS been triggered
activate event
else event B has NOT happened, do nothing
end event
you would have to add stuff like
"if event ID 1 has not been triggered
set event ID 1 to triggered
else event ID HAS been triggered"
for every turn such that it records a new event ID for every turn but only records the turns after an event happens
you could also do this much easier using ASM
event A happens turns 1-255
event B happens whenever
event A:
if event B has happened
if event ID 1 has not been triggered
set event ID 1 to triggered
else event ID HAS been triggered
activate event
else event B has NOT happened, do nothing
end event
you would have to add stuff like
"if event ID 1 has not been triggered
set event ID 1 to triggered
else event ID HAS been triggered"
for every turn such that it records a new event ID for every turn but only records the turns after an event happens
you could also do this much easier using ASM
Signature thanks to Shu.
#4
Posted 17 June 2014 - 01:17 PM
I'm not terribly good with conditionals yet, so none of this may work, but my C++ backgroud was yelling at me to add the following:
Say you want event B to happen 3 turns after event A, and it's something the player triggers, so you have no idea when it would start.
if event Z has triggered:
activate event B
else if event Y has been triggered:
activate event Z
else if event X has been triggered:
activate event Y
else if event A has been triggered:
activate event X
The basic idea is that event A is what the player does, which sets a flag. Event X sets the flag for event Y, which sets the flag for event Z, which sets the flag for event B, which is what you want to happen three turns later. I'm not sure if eventing uses the same sort of IF/ELSE shenanigans as C++, but if so, you want them using else ifs and in reverse order of the order they need to trigger in to be sure that only one happens per turn.
Say you want event B to happen 3 turns after event A, and it's something the player triggers, so you have no idea when it would start.
if event Z has triggered:
activate event B
else if event Y has been triggered:
activate event Z
else if event X has been triggered:
activate event Y
else if event A has been triggered:
activate event X
The basic idea is that event A is what the player does, which sets a flag. Event X sets the flag for event Y, which sets the flag for event Z, which sets the flag for event B, which is what you want to happen three turns later. I'm not sure if eventing uses the same sort of IF/ELSE shenanigans as C++, but if so, you want them using else ifs and in reverse order of the order they need to trigger in to be sure that only one happens per turn.
Images - 11/22 Writing - 5/17 FE: Immortal Shrine
Spoiler
Need help with hacking? Post in the subforum, or Skype me (smashedfish76).
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users