Scripting barrel events


(Justice) #1

So, I have a few props_flamebarrels here and I want them to trigger a rumble when they are shot down.

But it doesn’t work. The rumble works perfectly fine as I tried it with spawn{ }.

Here’s my script:

barrel
{
	activate
	{
		trigger rumble rumblestart
	}
}

rumble
{
	trigger rumblestart
	{
		wait 2000
		alertentity rumble
		trigger rumble rumbleloop
	}
	trigger rumbleloop
	{
		wait random 1100 3000
		alertentity rumble
		trigger rumble rumbleloop
	}
}

I have tried it with death, activate and activate allies. Nothing works :confused:
Is there any event which describes this situation? Or does props_flamebarrel have no events, as it’s not listed in this list?

If it doesn’t, how can I trigger the rumble with these barrels the easiest way?


(Destroy666) #2

You can’t script the action after barrel explosion directly. You need to use target_script_trigger.
Connect props_flamebarrel to tst. It should have:
targetname tst_name
scriptname tst_name
target nameoftarget


tst_name
{
	trigger nameoftarget
	{
           trigger rumble rumblestart
	}
}


(Justice) #3

Like this? It doesn’t seem to work :confused:

tst_barrel
{
	trigger barrel
	{
           trigger rumble rumblestart
	}
}

Could you explain me a bit more detailed?


(Destroy666) #4

TST target should not point at barrel, it should be the opposite (barrel connected with TST).
Example:

props_flamebarrel:
target TST_name

target_script_trigger:
targetname TST_name
scriptname TST_name
target nameoftarget

Script:

tst_name
{
	trigger nameoftarget
	{
           trigger rumble rumblestart
	}
}

TST target points at trigger in script.


(Justice) #5

Still doesn’t work :frowning:

Could you maybe help me on teamviewer?

EDIT: Nvm, spelled a property wrong :smiley:

Thanks pal :wink:


(eiM) #6

where do those props come from? I do not have them in my radiant, not with the et_entities beta 2 thing


(Destroy666) #7

From here:
https://zerowing.idsoftware.com/svn/radiant.gamepacks/ETPack/trunk/et.game/etmain/