Trigger Damage Problem
Moderator: Core Staff
Trigger Damage Problem
Hey Guys..
My trigger_damage wont work.
It works with knife, nades, flash.. But not if i shoot on it.
http://www.youtube.com/watch?v=u2J1qE51vyM
http://s14.directupload.net/images/130422/zi2ufhig.jpg
has anyone an idea?
btw.. sorry for my bad english
My trigger_damage wont work.
It works with knife, nades, flash.. But not if i shoot on it.
http://www.youtube.com/watch?v=u2J1qE51vyM
http://s14.directupload.net/images/130422/zi2ufhig.jpg
has anyone an idea?
btw.. sorry for my bad english
Re: Trigger Damage Problem
Maybe it has a special flag for shooting. You can reset all its flags in Radiant.
Re: Trigger Damage Problem
Already done but its a clean damage trigger..
http://s14.directupload.net/images/130422/zi2ufhig.jpg
http://s14.directupload.net/images/130422/zi2ufhig.jpg
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Trigger Damage Problem
Would like to see script and how you have made it (trigger textured brush + are you moving the trigger or just turning it on/off?)
you could also try:
trig setcandamage();
Just to make sure it is accepting damage.
you could also try:
trig setcandamage();
Just to make sure it is accepting damage.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Trigger Damage Problem
I tried it with cjmod and completly without mod..
Same shit..
Same shit..
Re: Trigger Damage Problem
done! Thank you!
Re: Trigger Damage Problem
Done.. I unlinked all trigger and make them static but they still wont work with bullets..
The biggest problem is that if i hit it with bullets it doesnt count "Hit" or "Missed".
If i knife it counts the hits and if i do nothing it counts the "Missed" so the trigger seems to noticed the bullets.. o.O
The biggest problem is that if i hit it with bullets it doesnt count "Hit" or "Missed".
If i knife it counts the hits and if i do nothing it counts the "Missed" so the trigger seems to noticed the bullets.. o.O
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Trigger Damage Problem
change trigger waittill("trigger", user)
to 'trigger waittill("damage", user)'
And see if that does the trick.
Also, clear all your mod directories into another folder while you test, just in case there is a mod affecting the damage.
to 'trigger waittill("damage", user)'
And see if that does the trick.
Also, clear all your mod directories into another folder while you test, just in case there is a mod affecting the damage.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Trigger Damage Problem
Done.. But everytime i shoot at the trigger i got an error..
Code: Select all
******* script runtime error *******
pair '50' and 'entity' has unmatching types 'int' and 'object': (file 'maps/mp/_collectiums.gsc', line 481)
if (user==level.userr) level.hit=true;
*
Error: started from:
(file 'maps/mp/_collectiums.gsc', line 480)
target4trig waittill("damage",user);
Error: ************************************
dvar set com_errorTitle Error
dvar set com_errorMessage script runtime error
(see console for details)
pair '50' and 'entity' has unmatching types 'int' and 'object'
Could not find menu 'main'
******* script runtime error *******
cannot cast undefined to bool: (file 'maps/mp/_collectiums.gsc', line 481)
if (user==level.userr) level.hit=true;
*
Error: started from:
(file 'maps/mp/_collectiums.gsc', line 480)
target4trig waittill("damage",user);
Error: ************************************
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Trigger Damage Problem
sorry.
trigger waittill ("damage", idamage, user)
Btw, that 50 means that the trigger is detecting 50 dmg.
trigger waittill ("damage", idamage, user)
Btw, that 50 means that the trigger is detecting 50 dmg.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: Trigger Damage Problem
What he means is that only when the damage(one shot, not accumulative) applied is above 50, then the trigger will be triggered. This would for example mean that if regular pistol bullets deal less than 50dmg you won't be able to trigger this at all.Btw, that 50 means that the trigger is detecting 50 dmg.
You could try adding a threshold value to the enitity in radiant:
key: threshold
value: 10
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: Trigger Damage Problem
I think Rezil is mistaken. Damage triggers are different from hurt triggers. The 'dmg' thing is only supposed for hurt triggers and determines how much it hurts entities on one frame; for damage triggers you should use the key 'threshold'.
But by default, triggers should respond on any damage.
But by default, triggers should respond on any damage.
-
- Core Staff
- Posts: 2030
- Joined: July 24th, 2006, 11:21 am
- Location: Cramped in a small cubicle/making another jump map
Re: Trigger Damage Problem
You're right, my mistake. Edited my post to use the proper term.megazor wrote:I think Rezil is mistaken. Damage triggers are different from hurt triggers. The 'dmg' thing is only supposed for hurt triggers and determines how much it hurts entities on one frame; for damage triggers you should use the key 'threshold'.
But by default, triggers should respond on any damage.
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.
Re: Trigger Damage Problem
Done.. Wont work..Drofder2004 wrote: sorry.
trigger waittill ("damage", idamage, user)
Done.. Wont work..Rezil wrote:You could try adding a threshold value to the enitity in radiant:
key: threshold
value: 10
Maybe someone can get it working on my testmap and tell me how:
http://unpure-gaming.de/~unpure/downloa ... _range.zip
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Trigger Damage Problem
One massive problem after a lot of testing, I found your "user.hits" is actually already a built-in variable.
The game resets the hits variable to zero after every bullet misses a player.
So, you hit the target, the map script says "+1" then the game script says "player missed, reset to 0" (this is used for one of the challenges in the stock game)
I have rebuilt the map and code for a look at a neater approach, but your old code will probably work with the adjustment of changing the variable. I suggest taking a look at how I did the mapping for the triggers and how I tied that in to the code using arrays.
The game resets the hits variable to zero after every bullet misses a player.
So, you hit the target, the map script says "+1" then the game script says "player missed, reset to 0" (this is used for one of the challenges in the stock game)
I have rebuilt the map and code for a look at a neater approach, but your old code will probably work with the adjustment of changing the variable. I suggest taking a look at how I did the mapping for the triggers and how I tied that in to the code using arrays.
You do not have the required permissions to view the files attached to this post.
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 32 guests