Game Triggers

Game Triggers

Nice little feature for PvE and SP missions. Most triggers either don’t work yet, or i’m missing something.

  • Item Spawning

To spawn items, you need to use game_trigger_processor_create_entity

This entity has the following properites:

kép

entity{
  _template:t="game_trigger_processor_create_entity"
  transform:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [299.954, 4.21113, -93.4972]]
  game_trigger_processor__onTriggerHash:i=1 //random no need to edit
  game_trigger_processor_create_entity__template:t="at_44_gun_item+item_in_world" //spawned entity
  "game_trigger_processor_create_entity__entityEid:eid":i=0
  game_trigger_processor_create_entity__initTransform:b=yes
  game_trigger_processor__onTrigger:t="atspawn" //name of the parent trigger that will spawn this entity
  game_trigger_processor_create_entity__destroyEntityOnDisappear:b=yes //needs research, of course name is self explanatory
}

Now we have the trigger that will spawn our AT-44 when triggered by another trigger. So we now we need that another trigger.

You can use:

  • Timer - Spawn weapon after X seconds of match creation
  • Box or Sphere - Spawn weapon when the player enters a box or sphere.

Timer example:

kép

Place the timer on the scene, first line as seen on screenshot will accept the trigger name of the entity creator, which was atspawn

kép

The timer will trigger the entity creator trigger after 30 seconds. (not after first spawned soldier!)

kép

The weapon is spawned at the creator after 30 seconds:

kép


  • Sphere or Box example:

You can also spawn something if the player enters a box or sphere.

After placing down either game_trigger_box or game_trigger_sphere (box is missing the actual box outliner), the entity has to be like this:

kép

entity{
  _template:t="game_trigger_sphere"
  transform:m=[[0.498703, 0, 0] [0, 0.860525, 0] [0, 0, 0.498703] [296.892, 3.28692, -93.5775]]
  sphere_zone__radius:r=5
  game_trigger_sphere__onEnterEventTrigger:t="atspawn" //which trigger to activate when entering sphere
  game_trigger_sphere__onLeaveEventTrigger:t="" //activate when leaving sphere

  "game_trigger__includeGrids:list<t>"{
    item:t="humans" //triggerable entities
  }

  "game_trigger__requireComponents:list<t>"{
    item:t="hero" //needed too. needs research.
  }
}

Once i enter this sphere:

The desired entity spawns:

Here is the scene.blk:
scene.txt (6.0 KB)

ONLY WORKS ON DEV CLIENT FOR NOW.


Other triggers that needs research:

game_trigger_processor_transform_transition - Based on BLK, it can move and rotate objects between two coordinates.
game_interactable_object_base - Doesn’t seem to work. It’s also missing a lot of properties from where this was ported from
game_trigger_appear - activates event
game_trigger_disappear - Haven’t checked yet.
game_trigger_processor_self_destroy - Haven’t checked yet.
game_trigger_processor_attach_game_effect - Sounds exciting. Couldn’t get it to work
game_trigger_processor_sound_oneshot - sounds interesting. Couldn’t get it to work, what soundName is it looking for?
game_trigger_processor_visual_log - Not sure what this would do as it does nothing. If it’s visual debug, it would be useful.
`

7 Likes

A simple chained trigger(?), where the concrete platform spawn as you move foward:

dynamicPlatform.zip (3.2 KB)

4 Likes

Is it possible to do the reverse so when the trigger is active it destroy platform?

It should be possible, yes. There is a disappear trigger

It’s a pity those aren’t those triggers I wanted to include (though similar ones), but they seem to be quite complete. Seem, but not proved. There are also no “modify” trigger, variables / counters, multiswitches and more. But all of those could be added in future.

2 Likes

Hope when it will be finish we could use if fonction for cool effect

Yeah they seem to be ported from Active Matter. (They also seem incomplete to me, especially the trigger that can move stuff between two coordinates)

Whatever this was added for, i hope we can get a sample scene

1 Like

How do you know that about Active Matter?

I was selected for CBT. And i datamine the game for myself, as it can be useful for Enlised modding.

The triggers are used in AM mainly to spawn enemies and or items. There are also many more triggers in AM, that was not ported to Enlisted.

I shouldn’t say more about this publicly.

3 Likes

I have done some research

  • According to how game_trigger_timer work, this should work the exact same

  • Except it waits for a game_trigger signal and destroys itself, instead of triggering signals after a countdown (and then destroy itself).

  • This will be useful by attaching to other objects, such as zombies, guns, or anything that you want to destroy by activating game trigger, either via game_trigger_timer(timer) or game_trigger_appear(instant)

  • This is more useful if you want to trigger the destruction of multiple entities instead of just one on a timer. (Because attach game_trigger_timer will do the job if it is for 1 entity)

2 Likes

Very interesting topic, thanks for sharing. But unfortunately, I didn’t have at_44_gun. I guess I didn’t understand something.

1 Like

you probably did it on your current enlisted.

which it’s not in the game yet.

but currently only in the callisto test server.

1 Like

Thanks for the clarification.

1 Like

We are waiting for the next update. It will be a milestone for us modders
(Also why no one give me likes to my post above)

2 Likes

@Bazsi37
How did you test this one? Did you attach it to an entity or it was just on its own. I think i see a pattern with this that it has to be attached onto something.

Same for this one. You probably need to attach it to the rendinst

I have seen this term called oneshot in gun sounds.
Try using the paths for gun sounds, as well as zombie mode round change sound. This should be a sound player that waits for game_trigger signal
Edit: you need something named net_sound__descs in the template for the trigger function to work


The script indicates that the boolean field is used to tell the game to delete what the processor spawned when the processor is being deleted

Not sure how you can use it though. Maybe you can attach a game_trigger_timer to the create entity trigger, that you want to deactivate after certain time

1 Like

(Also why no one give me likes to my post above)

Most humble modder. Here, take my like.

2 Likes

I gave you your like, it’s not difficult for me))).

2 Likes