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

Members Online

»
0 Active | 61 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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 Scripting
Scripting and coding with Call of Duty 2.
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: burn player
karabao32
General Member
Since: Mar 11, 2010
Posts: 24
Last: Apr 4, 2014
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Wednesday, Oct. 20, 2010 07:30 pm
Hi, help please...

I whant to burn and kill a player when he shoot a target...

this is my script but...[banghead]

Quote:

main()
{
level._effect["playerfire"] = loadfx ("fx/fire/character_torso_fire.efx");


croix = getentarray("targA", "targetname");
if(isdefined(targA))

}


burn(targA)
{
while(1)
{
self waittill ("trigger");

{
originA = self getOrigin();

playfx(level._effect["playerfire"], originA);


wait (0.1);

radiusDamage(originA + (0, 0, 50), 200, 100, 40);


break;
}
}
}



Thx...[wink]
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Wednesday, Oct. 20, 2010 08:00 pm
Try replacing TargA with croix further in the script.
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Wednesday, Oct. 20, 2010 08:01 pm
karabao32 writes...
Quote:
Hi, help please...

I whant to burn and kill a player when he shoot a target...

this is my script but...[banghead]

Quote:

main()
{
level._effect["playerfire"] = loadfx ("fx/fire/character_torso_fire.efx");


croix = getentarray("targA", "targetname");
if(isdefined(targA))

}


burn(targA)
{
while(1)
{
self waittill ("trigger");

{
originA = self getOrigin();

playfx(level._effect["playerfire"], originA);


wait (0.1);

radiusDamage(originA + (0, 0, 50), 200, 100, 40);


break;
}
}
}



Thx...[wink]


targA is not defined, you have croix = to targA so what u want to do is

Code:
main()
{
      	level._effect["playerfire"] = loadfx ("fx/fire/character_torso_fire.efx");

	thread burn();
}


burn()
{
	croix = getentarray("targA", "targetname");

	while(1)
	{
		croix waittill ("trigger", player);
		originA = player getOrigin();
		playfx(level._effect["playerfire"], originA);
		wait 0.05;
		player suicide();
		break;
       	 }
}


you also had a few syntax errors i bumped out for you give it a try


edited on Oct. 20, 2010 04:02 pm by liltc64

also if u want the loop to continue u might want to take out that break; cause then your loop wont work again... it will only work once but depending on how you want it im just leting you know before hand.
Share |
karabao32
General Member
Since: Mar 11, 2010
Posts: 24
Last: Apr 4, 2014
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Thursday, Oct. 21, 2010 07:02 pm
Hello,

Sorry but it don't work, I want burn my player burn when he shoot the target targA...

Please help![jumping]
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Oct. 21, 2010 07:16 pm
go in your radaint make the brush you want the player to shoot and burn then you want to put a trigger infront of your brush you have made (or where ever the player will be doing damage to this brush) then make this trigger a trigger_damage. you then want to select this trigger if u do not already have it selected and press N and give it a Key : "targetname", then Value : "targAtrig". now save your map and you are done with radaint, now dont forget to compile your map again. now you want to go into your maps .gsc and you want to add the following code.

Code:

main()
{
      	level._effect["playerfire"] = loadfx ("fx/fire/character_torso_fire.efx");

	thread burn();
}


burn()
{
        croixtrig = getentarray("targAtrig", "targetname");

	while(1)
	{
		croixtrig waittill ("trigger", player);
		originA = player getOrigin();
		playfx(level._effect["playerfire"], originA);
		wait 0.05;
		player suicide();
		break;
       	 }
}




edited on Oct. 21, 2010 03:16 pm by liltc64
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Thursday, Oct. 21, 2010 07:59 pm
This should work, simply make each trigger a trigger_damage and give it a targetname of 'target'.

Code:

main()
{
	level._effect["playerfire"] = loadFX( "fire/character_torso_fire" );

	targets = getEntArray( "target", "targetname" );
	for( i = 0; i < targets.size; i++ )
		targets[i] thread monitor_target();
}

monitor_target()
{
	while(1)
	{
		self waittill( "trigger", player );
		
		playFX( level._effect["playerfire"], getOrigin( player ) );
		
		wait 0.05;
		
		player suicide();
	}
}
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Oct. 22, 2010 03:30 pm
only us Xylozi's script if you have multiple triggers because you can get an error if you only have 1 trigger but his script is good for multiple triggers.
Share |
karabao32
General Member
Since: Mar 11, 2010
Posts: 24
Last: Apr 4, 2014
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Saturday, Oct. 23, 2010 02:05 pm
Hello,
Tanks for all, but ...

consol error:

Quote:
******* script compile error *******
unknown function: (file 'maps/mp/_shootcroix.gsc', line 17)
playFX( level._effect["playerfire"], getOrigin( player ) );
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Oct. 23, 2010 02:32 pm
use:

Code:
playFX( level._effect["playerfire"], player getOrigin() );


or if that still doesn't work

Code:
playFX( level._effect["playerfire"], player.origin );
Share |
karabao32
General Member
Since: Mar 11, 2010
Posts: 24
Last: Apr 4, 2014
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Saturday, Oct. 23, 2010 04:20 pm
Ok thanks it's good, but my player dead immediadly, how can he dead progressive with shell shock???

PS sorry for my english...[lol]


Code:
main()
{
	level._effect["playerfire"] = loadFX( "fx/fire/character_torso_fire" );

	targets = getEntArray( "target", "targetname" );
	for( i = 0; i < targets.size; i++ )
		targets[i] thread monitor_target();
}

monitor_target()
{
	while(1)
	{
		self waittill( "trigger", player );
		
		playFX( level._effect["playerfire"], player getOrigin() );
		
		wait 0.5;
		
		player suicide();
	}
}
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»