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 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: Trigger Hurt
R4R44VIS
General Member
Since: Apr 22, 2005
Posts: 553
Last: Jul 24, 2008
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 04:29 pm
Right im sure this has been answered before, but i had a look and couldnt find it.

Basically i have certain things in my map, destroyable walls, mortars and such. But i want people to be injured/killed by some of these things. So im guessing trigger_hurt is the thing to use, but how do i add that to my effect.

At a random guess for my walls i would just added "script_exploder" to my trigger_hurt (same script_exploder, as wall is set to) and then it'll work maybe?
But im at a loss for how it'd work with mortars.

Thanks
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 04:35 pm
You could script the trigger to tunr on using the _utility.gsc.. There isa function 'triggeron();' you can use.

For mortars just add a little radius damage to the impact ' radiusDamage(origin, 500, 2000, 1000);'
Share |
Badarse
General Member
Since: Apr 29, 2006
Posts: 60
Last: Oct 22, 2006
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 04:57 pm
Hi i dont want to jack the thread but i want to add damege also. where would i add

radiusDamage(origin, 500, 2000, 1000); ?

Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 05:32 pm
You generally need to add it after the triggered part of the script, normally along side the efx and sound part. Post your script for more info.
Share |
R4R44VIS
General Member
Since: Apr 22, 2005
Posts: 553
Last: Jul 24, 2008
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 06:24 pm
im actually using the one you made Rasta thats on RNR site.

it has the radius damage down the bottom, so do i need to add anything is it didnt do any damage when i just tested it.

Quote:
main ()
{

level._effect["mortar_explosion"][0] = loadfx ("fx/explosions/mortarExp_dirt.efx");
level._effect["mortar_explosion"][1] = loadfx ("fx/explosions/mortarExp_mud.efx");

thread rasta_mortars();
}

rasta_mortars()
{
mortars = getentarray ("cod2mortar","targetname");

while (1)
{
wait (3 + randomfloat(10));


GoodPosition = false;
while (!GoodPosition)
{

rand = randomint(mortars.size);


GoodPosition = true;
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
if (distance(mortars[rand].origin,players.origin) < 15)
{
GoodPosition = false;
break;
}
}
}


rand = randomint(mortars.size);
mortars[rand] playsound("mortars_are_here");

wait 2;

origin = mortars[rand] getorigin();
playfx (level._effect["mortar_explosion"][randomint(2)], origin);
mortars[rand] playsound("mortars_blew_me_up");

radiusDamage(mortars[rand].origin, 300, 2000, 50);

}
}

Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 06:27 pm
Thats should work fine, you could try increasing the values a little though. see if that helps.
Share |
R4R44VIS
General Member
Since: Apr 22, 2005
Posts: 553
Last: Jul 24, 2008
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 06:37 pm
I cant get it to do any damage, it works fine (as in the hit the ground fine), but doesnt do any damage.
Share |
lauramaegan
General Member
Since: Aug 9, 2004
Posts: 630
Last: Feb 11, 2007
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 09:42 pm
I would recomend you use this to set your damage:
radiusDamage(mortars[rand].origin + (0,0,12), 500, 50, 100);

edited on Sep. 24, 2006 05:44 pm by lauramaegan
Share |
Badarse
General Member
Since: Apr 29, 2006
Posts: 60
Last: Oct 22, 2006
[view latest posts]
Level 3
Category: CoD2 MP Mapping
Posted: Sunday, Sep. 24, 2006 09:50 pm
Rasta writes...
Quote:
You generally need to add it after the triggered part of the script, normally along side the efx and sound part. Post your script for more info.


This is what i have.

main()
{

level._effect["mortexplosion"] = loadfx("fx/explosions/artilleryExp_dirt_brown.efx");


thread mortar1();


}

mortar1()
{

action = getent ("action","targetname");
botground = getent ("botlayer","targetname");
topground = getent ("toplayer","targetname");
trigger = getent ("morttrig","targetname");

botground hide();

trigger waittill ("trigger");

origin = action getorigin();

action playsound("incoming_mortar");

wait (1);

action playsound("explosion_ground");

playfx(level._effect["mortexplosion"], origin);

botground show();

topground delete();



}
Share |
R4R44VIS
General Member
Since: Apr 22, 2005
Posts: 553
Last: Jul 24, 2008
[view latest posts]
Level 6
Category: CoD2 MP Mapping
Posted: Monday, Sep. 25, 2006 05:29 am
lauramaegan writes...
Quote:
I would recomend you use this to set your damage:
radiusDamage(mortars[rand].origin + (0,0,12), 500, 50, 100);

edited on Sep. 24, 2006 05:44 pm by lauramaegan


Thanks that works great!
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP 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

»