Jump to content

[SOLVED]How do I make the game check if certain characters are alive?


Tactician Aria
 Share

Recommended Posts

So, I need some help again. I need the game to check if certain NPCs are alive by chapters end and the reward for saving these NPCs is opening a gaiden chapter. However, as you may have guessed I have no idea how to set this up. Could someone show me the code I need, or point me in a direction where I could find it? Last question tonight I promise.

Edited by Tactician Duel
Link to comment
Share on other sites

Death quotes you set up using the Nightmare modules.

IFET and IFEF are conditionals. Specifically IF Event True and IF Event False.

Example:

Ending_event:
IFEF 0x01 0xYY // Replace YY with the death quote ID you chose for an NPC (start at 0x06 just like other event IDs)
// If you have more than 1 NPC you're checking for, use another IFEF and check the next ID
ITGM  0xZZ // Give reward if the ID was not triggered 
ENIF 0x01

// Any other stuff that needs to happen

MoveToChapter(0x??)
ENDA
	

 

If you're having trouble with the concepts of conditionals, check Arch's tutorials.

 

Edited by Primefusion
Link to comment
Share on other sites

9 hours ago, Primefusion said:

Death quotes you set up using the Nightmare modules.

IFET and IFEF are conditionals. Specifically IF Event True and IF Event False.

Example:


Ending_event:
IFEF 0x01 0xYY // Replace YY with the death quote ID you chose for an NPC (start at 0x06 just like other event IDs)
// If you have more than 1 NPC you're checking for, use another IFEF and check the next ID
ITGM  0xZZ // Give reward if the ID was not triggered 
ENIF 0x01

// Any other stuff that needs to happen

MoveToChapter(0x??)
ENDA
	

 

If you're having trouble with the concepts of conditionals, check Arch's tutorials.

 

So something like this?:

Ending_event:
Game_Win:
IFEF 0x01 0x62
MNCH 0x03
ENIF 0x01
IFET 0x01 0x62
MNCH 0x04
ENIF
ENUN
ENDA

(There will be actual events in there later, but this is just a test setup.)

Link to comment
Share on other sites

I'm trying to understand your intent. Are you trying to make so that if ID 0x62 wasn't triggered, you go to chapter 0x03, and if it was you go to chapter 0x04?
If so, you should be using an if/else structure:

Ending_event:
IFEF 0x01 0xYY
MNCH 0x03
ELSE 0x02
ENIF 0x01
MNCH 0x04
ENIF 0x02
// I don't know why you had an ENUN in here. It doesn't do anything in this context
ENDA
	

Also, I wouldn't use an ID like 0x62 if I were you. IDs greater than 0x40 can get very finicky and may be reset if you suspend and resume the game.

 

Edited by Primefusion
Link to comment
Share on other sites

On 2/5/2017 at 0:34 PM, Primefusion said:

I'm trying to understand your intent. Are you trying to make so that if ID 0x62 wasn't triggered, you go to chapter 0x03, and if it was you go to chapter 0x04?
If so, you should be using an if/else structure:


Ending_event:
IFEF 0x01 0xYY
MNCH 0x03
ELSE 0x02
ENIF 0x01
MNCH 0x04
ENIF 0x02
// I don't know why you had an ENUN in here. It doesn't do anything in this context
ENDA
	

Also, I wouldn't use an ID like 0x62 if I were you. IDs greater than 0x40 can get very finicky and may be reset if you suspend and resume the game.

 

Thanks prime, everything works fine now! I'm sorry I wasn't more specific. The reason for that ENUN code was just my paranoia. Sometimes I don't put in ENUN codes and it breaks the game, so I just put it in for good measure.

Link to comment
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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...