Questions Regarding Triggers

Creating new content for Trespasser!

Moderators: TresCom Support Team, TresCom Board Managers, TresCom Developers

Post Reply
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4353
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Questions Regarding Triggers

Post by TheIdiot »

I have a few questions regarding triggers and what they can do for anyone who might be able to help. Anything which could help is appreciated.

Question one: Is it possible to use a trigger to change a CInstance's AI type (ex.from ignored to carnivore food)? I'm trying to make a working flare that, when activated, works as a distraction for carnivores so they might chase after it instead of the player due to it being an alternate source of "food", but does not work as a distraction if it is inactive.

Question two: I'm trying to use a trigger to swap the mesh for a CInstance, but when the trigger is activated, the game crashes to desktop without an error message. I'm running in Tres CE, if it matters. This occurs with two separate instances, though from what I gather they are set up correctly. Does it have something to do with the models used as substitutes? For example, I have mesh PDXAntidote00-00 with $PDXAntidote01-00 as an A00 value in the former's TScript, and they both have the same coordinates and such, but the game still crashes when I fire a trigger telling the game to swap the meshes. I have a feeling it has something to do with different material IDs between the two models.

Question three: Can I create my own, brand new particle effects and have them used by the ATX Actiontype 117, and if so, could someone please walk me through it? I have an instance prepared, but it doesn't seem to be adding my new effect ("Flare"). If not, how would I go about modifying other in-game particles to suit my needs? In addition, is there a list of default particle effects anywhere? I've looked at the one in the ATX readme, but I've noticed it's lacking one or two (particularly the Cattle Prod effect), so I'm just curious as to whether there are any more.

That's all for now, chances are there will be more in the future. Thanks in advance for help! :mrgreen:
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: Questions Regarding Triggers

Post by machf »

TheIdiot wrote: Question two: I'm trying to use a trigger to swap the mesh for a CInstance, but when the trigger is activated, the game crashes to desktop without an error message. I'm running in Tres CE, if it matters. This occurs with two separate instances, though from what I gather they are set up correctly. Does it have something to do with the models used as substitutes? For example, I have mesh PDXAntidote00-00 with $PDXAntidote01-00 as an A00 value in the former's TScript, and they both have the same coordinates and such, but the game still crashes when I fire a trigger telling the game to swap the meshes. I have a feeling it has something to do with different material IDs between the two models.
IIRC, it only works with "Animates" - things with a skeleton, like the player and the dinosaurs. You can't substitute other types of objects. I've forgotten to mention that.
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4353
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Questions Regarding Triggers

Post by TheIdiot »

machf wrote:
TheIdiot wrote: Question two: I'm trying to use a trigger to swap the mesh for a CInstance, but when the trigger is activated, the game crashes to desktop without an error message. I'm running in Tres CE, if it matters. This occurs with two separate instances, though from what I gather they are set up correctly. Does it have something to do with the models used as substitutes? For example, I have mesh PDXAntidote00-00 with $PDXAntidote01-00 as an A00 value in the former's TScript, and they both have the same coordinates and such, but the game still crashes when I fire a trigger telling the game to swap the meshes. I have a feeling it has something to do with different material IDs between the two models.
IIRC, it only works with "Animates" - things with a skeleton, like the player and the dinosaurs. You can't substitute other types of objects. I've forgotten to mention that.
Hmm. Would I be able to instead attach a CEntityAttached to my mesh and have it set to invisible, and then when I need to swap the meshes turn the original invisible and show the new one?
Slugger
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 4720
Joined: Sat Jun 12, 2004 6:52 pm
Antispam: No
Location: Atlanta

Re: Questions Regarding Triggers

Post by Slugger »

TheIdiot wrote:Question one: Is it possible to use a trigger to change a CInstance's AI type (ex.from ignored to carnivore food)? I'm trying to make a working flare that, when activated, works as a distraction for carnivores so they might chase after it instead of the player due to it being an alternate source of "food", but does not work as a distraction if it is inactive.
No, but you can deactivate the ActEat or set an ActStayNear near to the flare to draw the dino away from the player.

TheIdiot wrote:Question three: Can I create my own, brand new particle effects and have them used by the ATX Actiontype 117, and if so, could someone please walk me through it? I have an instance prepared, but it doesn't seem to be adding my new effect ("Flare"). If not, how would I go about modifying other in-game particles to suit my needs? In addition, is there a list of default particle effects anywhere? I've looked at the one in the ATX readme, but I've noticed it's lacking one or two (particularly the Cattle Prod effect), so I'm just curious as to whether there are any more.
In each level there is an object specifying various particle effects. Just search for "Effect" in TresEd. It's all pretty self-explanatory.
0066521C: 'Cannot create local swap file - Is Trespasser installed??',0Ah,0
"Cold lino was the driving force behind world power!"
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4353
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Questions Regarding Triggers

Post by TheIdiot »

TheIdiot wrote:Question one: Is it possible to use a trigger to change a CInstance's AI type (ex.from ignored to carnivore food)? I'm trying to make a working flare that, when activated, works as a distraction for carnivores so they might chase after it instead of the player due to it being an alternate source of "food", but does not work as a distraction if it is inactive.
No, but you can deactivate the ActEat or set an ActStayNear near to the flare to draw the dino away from the player.
I've already thought of that, but it's not going to work considering the flare is intended to distract ALL dinosaurs globally - which will number 200+ - not just one or two instances. I've asked Lee Arbuco if an AIType trigger can be created in Tres CE.
TheIdiot wrote:Question three: Can I create my own, brand new particle effects and have them used by the ATX Actiontype 117, and if so, could someone please walk me through it? I have an instance prepared, but it doesn't seem to be adding my new effect ("Flare"). If not, how would I go about modifying other in-game particles to suit my needs? In addition, is there a list of default particle effects anywhere? I've looked at the one in the ATX readme, but I've noticed it's lacking one or two (particularly the Cattle Prod effect), so I'm just curious as to whether there are any more.
In each level there is an object specifying various particle effects. Just search for "Effect" in TresEd. It's all pretty self-explanatory.
Okay, thanks. :)
Slugger
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 4720
Joined: Sat Jun 12, 2004 6:52 pm
Antispam: No
Location: Atlanta

Re: Questions Regarding Triggers

Post by Slugger »

TheIdiot wrote: I've already thought of that, but it's not going to work considering the flare is intended to distract ALL dinosaurs globally - which will number 200+ - not just one or two instances. I've asked Lee Arbuco if an AIType trigger can be created in Tres CE.
Your level has 200+ dinos? What?
0066521C: 'Cannot create local swap file - Is Trespasser installed??',0Ah,0
"Cold lino was the driving force behind world power!"
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14077
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Questions Regarding Triggers

Post by Draconisaurus »

TheIdiot wrote:
machf wrote:
TheIdiot wrote: Question two: I'm trying to use a trigger to swap the mesh for a CInstance, but when the trigger is activated, the game crashes to desktop without an error message. I'm running in Tres CE, if it matters. This occurs with two separate instances, though from what I gather they are set up correctly. Does it have something to do with the models used as substitutes? For example, I have mesh PDXAntidote00-00 with $PDXAntidote01-00 as an A00 value in the former's TScript, and they both have the same coordinates and such, but the game still crashes when I fire a trigger telling the game to swap the meshes. I have a feeling it has something to do with different material IDs between the two models.
IIRC, it only works with "Animates" - things with a skeleton, like the player and the dinosaurs. You can't substitute other types of objects. I've forgotten to mention that.
Hmm. Would I be able to instead attach a CEntityAttached to my mesh and have it set to invisible, and then when I need to swap the meshes turn the original invisible and show the new one?
I don't see why that wouldn't work - test it!

For the flare gun... I recall that the harpoon gun in the final TC~Isle teleports the harpoon back onto the gun when you go to pick it up, or something like that. I could be mistaken about how it's done - go check it out, might help. But what I'm thinking is that you could teleport an (invisible) obj onto the flare which has the AI value you need.

For the particle effects... Check out "\Trespasser Twilight\Shell Generator\Import_Base\ParticleEffects.values.txt". ;) Also, the Stargate test level features "drones" created out of custom particles (made by Slugger)... The triggers are in there somewhere. Aaaaand, it may help to look at the particle effects for snow (default, and in Winter Contest) and for rain (in East Dock). They are set up at least similarly.
User avatar
tatu
-=TresCom Website Manager=-
-=TresCom Website Manager=-
Posts: 5100
Joined: Fri Jun 24, 2005 9:40 pm
Antispam: No
Location: Sweden
Contact:

Re: Questions Regarding Triggers

Post by tatu »

Slugger wrote:In each level there is an object specifying various particle effects. Just search for "Effect" in TresEd. It's all pretty self-explanatory.
No, as I recall it, maybe only the LAB got those. Not all of them IIRC.
Active project: Trespasser: Isla Sorna
Status:
BE-PH1: Released
PH2-IT: Pre-released
PL-SUM: In production

"...there used to be more benches, but InGen's workers removed them during the evacuation in the name of framerate."
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14077
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: Questions Regarding Triggers

Post by Draconisaurus »

I think it's more than Lab (obviously IT has the zap one) but I don't think it's all of them, no.
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4353
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: Questions Regarding Triggers

Post by TheIdiot »

Slugger wrote:
TheIdiot wrote: I've already thought of that, but it's not going to work considering the flare is intended to distract ALL dinosaurs globally - which will number 200+ - not just one or two instances. I've asked Lee Arbuco if an AIType trigger can be created in Tres CE.
Your level has 200+ dinos? What?
Yes - I think the number is going to be 292, to be exact. 8) They're all going to be spread out across a huge map, though, so you'll never find more than six in one area.
Hmm. Would I be able to instead attach a CEntityAttached to my mesh and have it set to invisible, and then when I need to swap the meshes turn the original invisible and show the new one?
I don't see why that wouldn't work - test it!
It worked, but I had to make new mesh copies for both the main flare CInstance and its two CEntityAttached objects. Bit of a hassle, but it gets the job done.
For the flare gun... I recall that the harpoon gun in the final TC~Isle teleports the harpoon back onto the gun when you go to pick it up, or something like that. I could be mistaken about how it's done - go check it out, might help. But what I'm thinking is that you could teleport an (invisible) obj onto the flare which has the AI value you need.
Ho ho! Didn't think of that. I think I know exactly how I might do this. :P Though I'm not making a regular flare gun (yet, there will be one though), instead it's just a standard road flare which you can throw.
For the particle effects... Check out "\Trespasser Twilight\Shell Generator\Import_Base\ParticleEffects.values.txt". ;) Also, the Stargate test level features "drones" created out of custom particles (made by Slugger)... The triggers are in there somewhere. Aaaaand, it may help to look at the particle effects for snow (default, and in Winter Contest) and for rain (in East Dock). They are set up at least similarly.
Thanks for all the references - I'll take a look. Hopefully I can get it up and running. I imported an effect from JR and it didn't seem to work even after I changed it...maybe a brand new effect will work.
In each level there is an object specifying various particle effects. Just search for "Effect" in TresEd. It's all pretty self-explanatory.
No, as I recall it, maybe only the LAB got those. Not all of them IIRC.
JR has them from what I found as well, also I'm fairly certain IT has them for the stun gun.
Image
Post Reply