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

Members Online

»
0 Active | 5 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 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Need a little help
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Wednesday, Feb. 5, 2014 05:19 pm
Hello!

I'm having a little problem, i know it's not hard, but i just never did this on any of my maps and i can't find it anywhere so i'm asking you for help!

The thing is i always made jump maps, but now i started making Deathrun map and i made a platform with trigger_hurt (Entity key and value - dmg 999) on it and normally the player dies when touching it, but i want to add my own sound to it so when he dies the sound plays!

I know how to make soundaliases file and i know how to make the sound working on map, i just don't know how to play the sound on players death!

It's like on the picture!



Please help, and thank you!
Share |
MODDER_BC
General Member
Since: Oct 17, 2012
Posts: 54
Last: Jan 30, 2015
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Thursday, Feb. 6, 2014 08:41 am
Here's the basics.Give the trigger_hurt a targetname and use a function to play the sound when player hits the trigger. Kind of like this.
Code:

hurt_trigger_sound()
{
hurt_trig = getent("hurt_trigger","targetname");
hurt_trig waittill("trigger");
level.player playsound ("sound_to_play");
}
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Thursday, Feb. 6, 2014 10:59 pm
I made something similar but it didn't work with trigger_hurt!
Gonna try this!

Thank you MODDER_BC! [thumbs_up]
Share |
FzBr.d4rk
General Member
Since: Jan 23, 2011
Posts: 86
Last: Jun 7, 2016
[view latest posts]
Level 3
Category: CoD4 MP Mapping
Posted: Friday, Feb. 7, 2014 03:24 am

Tthis will work but only once. You need to add a loop.

Code:

hurt_trigger_sound()
{

  hurt_trig = getent("hurt_trigger","targetname");

for(;;)
{
  hurt_trig waittill("trigger");
  level.player playsound ("sound_to_play");
}
}
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Saturday, Feb. 8, 2014 05:31 am
In one of my maps I had a place where if a player fell down a pit, he would die when he hit a trigger, basically a kill trigger. But because I wanted to add a few fun things to it, I made the trigger just a trigger_multiple, instead of a trigger_hurt. I used a damage radius to kill the player. Had a custom sound play too, it was actually the Wilhelm scream. The sounds radius obviously is set up in the alias, so if you wanted other players to hear it, you would have to make the radius fairly large unless the player was near the dying player. This is the exact script I made and used in Citi Badlands. Maybe you can get some ideas from it.

I killed the player using a kill radius, much like a grenade or placing a trigger hurt inside the player, or something. Then I showed on screen some fun death messages. The code grabs the players name and prints it with one of the randomly chosen death message. Anyways, have a look. [cool]

Code:

main()
{
	thread scream_fall();
}

scream_fall()
{
	death = getent("scream","targetname");

	while(1)
	{
		death waittill("trigger", player);
		player playsound ("scream");
		radiusDamage(player.origin, 22, 3000, 3000);
		deathmethod[0] = " thought he had wings...";
		deathmethod[1] = " slipped on a stick of butter...";
		deathmethod[2] = " tripped on his laces into the ravine...";
		deathmethod[3] = " committed suicide...";
		iPrintln(player.name + deathmethod[randomInt(deathmethod.size)]);
		wait(0.3);
	}
}
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 MP Mapping
Posted: Saturday, Feb. 8, 2014 10:51 pm
I couldn't get the sound to work on trigger_hurt, so i just placed trigger_multiple and did it the old fashioned way! [banghead]
Thank you all for help! [thumbs_up]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 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

»