Jump to content
Sign in to follow this  
pagoz87

Eventing problem [SOLVED]

Recommended Posts

Hi guys I have recently started with FE hacking and now im learning to do events, but actually I got a weird error that makes the games freezes.

So here is the vid of what exactly happend...

http://youtu.be/S7v7ElFuANI

the problem is that when I move ally units the game crash. Also is such a simple script, (I only put 2 units, no turn events and that) so I am a bit confused about what have I done bad...

I hope that you guys can help me.

Edited by pagoz87

Share this post


Link to post
Share on other sites

Finally i could solved the problem. I dont really know what I do but it actually works. Basically at the end of the "Turn events" "Character events" and "Location events" I write ENDA. I change the "ENDA" for "TURN", "CHAR" and "LOCA" and now it works fine.

Share this post


Link to post
Share on other sites

the mainstream tutorials don't explain this very well (i'm in the process of writing my own, for the record)

The groups of code like "Turn_events" or "Misc_events" are event trigger arrays. They aren't actual event code, per se, and more lists of "when X happens, go to Y pointer and perform the events located there". For example, "TURN 0x0 TurnFourEvents [4,4]" tells the game that, on every turn between turns 4 and 4 (the [4,4], which really means "just do this on turn 4"), go to the code labeled "TurnFourEvents" and do the stuff there.

The thing is, the game has no way of knowing how many TURNs (or AFEVs, or CHESs, etc) there are in advance. For Misc_events, for example, every time a unit ends its turn, it just starts checking every single condition in there. Without knowing the end, it would theoretically check forever (because they're all numbers to the computer). We don't want this, so to signal that "hey, there's no more triggers here", we put a terminator. Generally, this is the purpose of END_MAIN. However, you can accomplish the same effect by just putting a blank trigger with no actual data (hence the empty TURN or empty AFEV, etc at the end of a lot of the old templates).

The function of the terminator is completely different from that of ENDA, which honestly has no synonym (the closest would be ENDB, which also does something completely different). ENDA tells the game to stop performing events and return control to the player, like you thought. The blank AFEV (or END_MAIN, or any of the other ones) does not mean the same thing, because the places in the code where you'd put them are never meant to be performed. As a rule of thumb, if the game is doing something obvious (loading units, playing music, showing text), you'll want to end it with ENDA. Otherwise use END_MAIN (or a blank trigger - AFEV/TURN/CHAR/LOCA)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...