Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 7 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoD Mapping
CoD mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Damage Trigger Trouble
HandyBendyAndy
General Member
Since: Feb 25, 2005
Posts: 21
Last: Apr 25, 2006
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Wednesday, Aug. 31, 2005 03:52 pm
Hi there,

Not been on these formus for a while, but they are stil lthe best place for good advice as far as I am concerned.

I have a problem with a damage trigger. It's a question that HAS been asked before, but I can't find an answer to it.

When I set up a damage trigger with a threshold OR and accumulate key, nothing seems to trigger it except grenades. ALL the damage types are enabled, and the threshold is set quite low. So why doesn't the trigger work? Values as below:

classname: trigger_damage
accumulate: 100
threshold: 30
spawnflags: 0
script_exploder: 20
targetname: trig_20

The target name is only really there for debugging purposes - I monitor the damage by using trig_entity waittill("damage") and then get the damage from the entity to see what is going on. As far as I can see, it should trigger the appropriate exploder, but it only works when a grenade goes off next to it.

Any ideas? All help greatly appreciated.

A.
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD Mapping
Posted: Wednesday, Aug. 31, 2005 04:06 pm
Try using

trig_entity waittill("trigger");

instead of the trig_entity waittill("damage");
Share |
HandyBendyAndy
General Member
Since: Feb 25, 2005
Posts: 21
Last: Apr 25, 2006
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Wednesday, Aug. 31, 2005 04:19 pm
Sorry, should have explained better - i am using the waittill construct as follows:

trigwatch()
{
wait(30);
iprintln("Getting trigger ...");
a=getent("wintrig","targetname");
if (isdefined(a))
{
iprintln("Found trigger");
iprintln("Starting tigger loop ...");
totaldamage = 0;
while(1)
{
a waittill ("damage",amount);
totaldamage += amount;
iprintln(amount);
iprintln(totaldamage);
}
}
iprintln("Trigger not found");
}

This is ONLY for debugging as the exploder works fine, but ONLY when a grenade goes off.

I have just tried switching OFF splash damage, and now even a grenade doesn't work. So I set the accumulate key down to a value of 2 just to see what happens, and it now needs over 900 damage to trigger the exploder. WHAT IS GOING ON HERE? ARRRRRHHHGGGHHGHGHGHHGG! [confused][crazy][banghead]

A.
Share |
HandyBendyAndy
General Member
Since: Feb 25, 2005
Posts: 21
Last: Apr 25, 2006
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Wednesday, Aug. 31, 2005 04:28 pm
Oh, also, some figures from the damage debug loop:

Damage / Weapon / Total accumulated damage



113 / Grenade / 2687
113 / Grenade / 2800
113 / Grenade / 2913
70 / BAR / 2983 BOOOOOOM - trigger activated

This was with the accumulate key set to 0.5 (trying everything now).

A.
Share |
HandyBendyAndy
General Member
Since: Feb 25, 2005
Posts: 21
Last: Apr 25, 2006
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Thursday, Sep. 1, 2005 07:47 pm
Hello? Anyone out there? (LOL)

Still experimenting with the above. I can't seem to get the different damage levels to work at all. Is this a known problem, as I haven't found it anywhere else in the forums? (Yes, I have searched. Thoroughly). [crazy]

A.
Share |
Sgt_Skywalker
General Member
Since: Mar 27, 2004
Posts: 35
Last: Dec 16, 2005
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Thursday, Sep. 1, 2005 08:19 pm
hi mental,

i experienced the same here. it seems, the trigger_damage features in entity editor doesn't work correctly. i noticed more probs with multiplayer than with singleplayer. i help myself by setting threshholds completely scripted:

Code:
main()
{
	//"Basics"
	maps\mp\_load::main();
	game["allies"] = "american";
	game["axis"] = "german";

	trig01 = getent ("trigger01", "targetname");
	trig01 thread trigger_dmg();
}

trigger_dmg()
{
	dmg = 0; //reset my values
	hitpoints = 150; //define your desired threshhold here
	wait 30;
	while (dmg < hitpoints)
	{
		self waittill ("damage", amount);
		dmg += amount; // add my damage to VAR dmg
		if (dmg >= hitpoints)
		{
			iprintln("Gotcha!");
			self thread trigger_dmg();
			return;
		}
	}
}


hope this helps you a bit further.
cheers
Share |
HandyBendyAndy
General Member
Since: Feb 25, 2005
Posts: 21
Last: Apr 25, 2006
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Thursday, Sep. 1, 2005 08:30 pm
Ah Ha!

Thank you very much for that. It looks just like the monitoring loop I've been using for debugging. Thought there was something fishy about the way that was working.

I'll have to write a couple of functions to handle all the damage triggers I am using so that I can make them work correctly (ouch!).

Incidentally, does anyone know how to extract entity keys from an entity? In other words, get a list of the keys defined in an entity and the values associated with them?

Thanks again.

A.
Share |
The_Caretaker
General Member
Since: Jun 8, 2004
Posts: 11625
Last: Jul 7, 2009
[view latest posts]
Level 10
Category: CoD Mapping
Posted: Thursday, Sep. 1, 2005 09:17 pm
if you've added them yourself in your .map file.. you know them already, don't you?

If not... you can open your .bsp file in notepad and chekc out the entities. It's a bit of digging around but they're in there..
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»