Page 1 of 1

Character Triggers

Posted: Thu Aug 26, 2004 5:50 am
by [Roe] Snake
Hey,

I have a problem getting a few triggers right... I want to make a prefab1 character and when you pick this character and enter the BOS bunker after the first mission is complete, there needs to be a UNIT/NPC deactived.

The unit that needs to be deactivated is Player "Snake", this character will be active as an NPC when the Prefab1 character is NOT picked... but when you do pick the Prefab1 character "Snake" needs to be deactived... But it wont work.

I got the triggers as following:

------------
Condition:
------------
prefab1 has More then 0 Alive at Anywhere

--------
Action:
--------
Deactive Snake


Can anyone help me figure out why the "Snake" will not be deactived as soon as I enter the Bunker... The character is out of the field of vision when I get spawned into the bunker...

Posted: Thu Aug 26, 2004 5:52 am
by Retlaw83
Did you set "nuke triggers on exit" in your first mission? I think doing that also nukes tagnames. So, when your character hits the exit grid at the end of mission one their tagname disappears.

Posted: Thu Aug 26, 2004 6:13 am
by [Roe] Snake
Ok I'll check it out... matter of 4 minute testing or something :) Thanks

Posted: Thu Aug 26, 2004 6:20 am
by [Roe] Snake
No, I did not check the "nuke triggers on exit"

It still doesn't work :( Anyone ?

Posted: Thu Aug 26, 2004 6:23 am
by Retlaw83
Sorry. I tried.

Maybe the tagnames get nuked regardless?

Posted: Thu Aug 26, 2004 6:35 am
by [Roe] Snake
I doubt that... I made it work before but now it just doesn't work anymore... Don't know why...

Posted: Fri Aug 27, 2004 5:31 am
by quietfanatic
What would seem best to me is to set a campaign variable as true in the starting map, and then use it to trigger the event at the bunker.

------------
Condition:
------------
always

--------
Action:
--------
Set campaign variable 'startingsnake' to 'f'.

And also:

------------
Condition:
------------
'prefab1' has more than 0 hit points at anywhere

--------
Action:
--------
B wait one second. (don't think this is really neccessary)
Set campaign variable 'startingsnake' to 't'.

Then in the bunker mission, create a new player index which only consists of your NPC tagged 'snake' and have it set on player move state as deactivated. The trigger will then be as follows.

------------
Condition:
------------
campaign variable 'startingsnake' is 'f'

--------
Action:
--------
Change unit 'snake's player to 1.

He will then appear as part of your team, even though that might seem a bit strange from the RPG perspective. In that case you could use force speech or merely 'change player snake's movestate to stationary at anywhere'.

I don't have time to test it right now, but I hope it works. What exactly did you want to do.

Posted: Fri Aug 27, 2004 5:31 am
by quietfanatic
What would seem best to me is to set a campaign variable as true in the starting map, and then use it to trigger the event at the bunker.

------------
Condition:
------------
always

--------
Action:
--------
Set campaign variable 'startingsnake' to 'f'.

And also:

------------
Condition:
------------
'prefab1' has more than 0 hit points at anywhere

--------
Action:
--------
B wait one second. (don't think this is really neccessary)
Set campaign variable 'startingsnake' to 't'.

Then in the bunker mission, create a new player index which only consists of your NPC tagged 'snake' and have it set on player move state as deactivated. The trigger will then be as follows.

------------
Condition:
------------
campaign variable 'startingsnake' is 'f'

--------
Action:
--------
Change unit 'snake's player to 1.

He will then appear as part of your team, even though that might seem a bit strange from the RPG perspective. In that case you could use force speech or merely 'change player snake's movestate to stationary at anywhere'.

I don't have time to test it right now, but I hope it works. What exactly did you want to do.

Posted: Fri Aug 27, 2004 6:07 am
by [Roe] Snake
Well... the problem, the "Prefab" character Snake is different from the NPC Character Snake... So that's the problem... They are two different entities and I've given the NPC Player #9 called "Snake"

The prefab character is tagged in the entitie editor as "prefab1"

So when Prefab1 character enters, NPC Snake has to be deactivated... This worked before... but now I can't seem to get it working and I haven't got one clue why...

It's so damn simple but it just doesn't work... Preserve won't work, Nuke Triggers On Exit is off... so I can't find the problem...

Posted: Fri Aug 27, 2004 6:07 am
by [Roe] Snake
Well... the problem, the "Prefab" character Snake is different from the NPC Character Snake... So that's the problem... They are two different entities and I've given the NPC Player #9 called "Snake"

The prefab character is tagged in the entitie editor as "prefab1"

So when Prefab1 character enters, NPC Snake has to be deactivated... This worked before... but now I can't seem to get it working and I haven't got one clue why...

It's so damn simple but it just doesn't work... Preserve won't work, Nuke Triggers On Exit is off... so I can't find the problem...

Posted: Sat Aug 28, 2004 2:43 pm
by requiem_for_a_starfury
Is the npc 'snake' set to player index 1? So that when you enter the map he/she automatically joins your squad? If so then you'd be better off having the npc on a different PI and then require the player to talk to the npc to hire it.

The best way to work this, is to have the npc as part of the recruit pool in the campaign text and not on the actual map. Then use triggers to add the npc to the recruit pool (and recruit master) unless a campaign variable is triggered because the player has chosen the prefab.

And double check in your trigger you haven't put the tagname of prefab1 as Prefab1 or prefab 1 etc!