Page 1 of 1

Need help with my target range map

Posted: August 25th, 2012, 2:34 pm
by ReDoX
Im making a target range map. I made the targets, and I linked every trigger to its target and I scripted the targets to randomly come up one at a time. Now what I want is that when a player shoots the target, his score increases. (The score that is shown when you hold tab) Is that possible without modding? Is it possible at all?

Re: Need help with my target range map

Posted: August 25th, 2012, 2:58 pm
by Drofder2004

Code: Select all

target waittill("damage", player);
player.score += scorePerTarget; 

Re: Need help with my target range map

Posted: August 25th, 2012, 3:55 pm
by megazor
In cod1, damage triggers can work with both "trigger" and "damage" notifies. With "damage", I was unable to get the entity that would cause damage. On the other hand, with "trigger", I only got the entity and couldn't get damage points. So maybe Drofder's code won't work and mine will do.

Code: Select all

target waittill("trigger", player);

player.score += scorePerTarget;

Re: Need help with my target range map

Posted: August 25th, 2012, 4:42 pm
by Drofder2004
megazor wrote:In cod1, damage triggers can work with both "trigger" and "damage" notifies. With "damage", I was unable to get the entity that would cause damage. On the other hand, with "trigger", I only got the entity and couldn't get damage points. So maybe Drofder's code won't work and mine will do.

Code: Select all

target waittill("trigger", player);

player.score += scorePerTarget;
In CoD1

Code: Select all

ent waittill("damage", idamage, player);
I believe would retrieve the amount of damage and then the player.

Re: Need help with my target range map

Posted: August 26th, 2012, 2:47 am
by megazor
Ye, i did try something like

trig waittill("damage", lol, omg, wtf, etc);

but i couldn't get it.

Re: Need help with my target range map

Posted: August 26th, 2012, 5:43 am
by Drofder2004
megazor wrote:Ye, i did try something like

trig waittill("damage", lol, omg, wtf, etc);

but i couldn't get it.
Hmm, maybe it was introduced in UO or CoD2. I have definitly done it pre-CoD4.

Re: Need help with my target range map

Posted: August 26th, 2012, 11:12 am
by megazor
Yes, it works in CoD2 and therefore, obviously, in next cod games. Just tested. Sexy developers.