QuestionInvisibility question for The Hidden

Posts 18 of 8 · Page 1 of 1
Invisibility question for The Hidden
I am working on a game mode from the old game The Hidden: Source and can't find out how to make the players invisible in a good manner. If I set the player's model to nothing they seem to have god mode. If I simply set self hide();, you can not hear any footsteps, making it impossible to know your about to get stabbed. Is there any way to make the player both emit sounds and be invisible?
Can't you add a sound_fx on the players location?
Well I am quite new to coding so I'm not sure how to add a sound_fx to a player when they move. Plus, not sure what sound files will sound similar to The Hidden at all. Would prefer to have footsteps or something similar.
Quote Originally Posted by aIW|Convery View Post
Can't you add a sound_fx on the players location?
Easier said than done...

If you give me the soundalias, then it would've been pretty easy.
Code:
doSound()
{
self endon("disconnect");
self notifyOnPlayerCommand( "W", "+forward" );
self notifyOnPlayerCommand( "S", "+back" );
self notifyOnPlayerCommand( "A", "+moveleft" );
self notifyOnPlayerCommand( "D", "+moveright" );

for(;;)
}
self waittill( "W");
self waittill( "S");
self waittill( "A");
self waittill( "D");
self playsound("SOUND"); //Just replace the "SOUND" with the sound you want.
wait 0.5;
{
}
I couldnt find a footstep mp. But you could use something else.

Code:
mp_level_up 
 spawn_music 
 defeat_music 
 victory_music 
 winning_music 
 losing_music 
 mp_defeat 
 mp_time_running_out_winning 
 mp_time_running_out_losing 
 mp_time_running_out_winning 
 mp_time_running_out_losing 
 mp_suspense_01 
 mp_suspense_02 
 mp_suspense_03 
 mp_suspense_04 
 mp_suspense_05 
 mp_suspense_06 
 mission_succes 
 mission_fail 
 draw 
 encourage_win 
 encourage_lost 
 timesup 
 winning 
 losing 
 winning_fight 
 losing_fight 
 lead_lost 
 tied 
 lead_taken 
 lastalive 
 boost 
 hardcore 
 highspeed 
 tactical 
 challengecomplete 
 promotion 
 acheive_bomb 
 bomb_taken 
 bomb_defused 
 bomb_planted 
 securedobj 
 lostobj 
 obj_defend 
 obj_destroy 
 capture_obj 
 capture_objs 
 hq_located 
 hq_captured 
 hq_destroyed 
 hq_offline 
 hq_online 
 new_positions 
 pushforward 
 attack 
 defend 
 offense 
 defense 
 halftime 
 overtime 
 switching 
 ourflag 
 ourflag_drop 
 ourflag_return 
 ourflag_capt 
 getback_ourflag 
 enemyflag_tobase 
 enemyflag 
 enemyflag_drop 
 enemyflag_return 
 enemyflag_capt 
 capturing_a 
 capturing_b 
 capturing_c 
 capture_a 
 capture_b 
 capture_c 
 securing_a 
 securing_b 
 securing_c 
 secure_a 
 secure_b 
 secure_c 
 losing_a 
 losing_b 
 losing_c 
 lost_a 
 lost_b 
 lost_c 
 enemy_take_a 
 enemy_take_b 
 enemy_take_c 
 enemy_has_a 
 enemy_has_b 
 enemy_has_c 
 take_positions 
 positions_lock 
 dest_sentrygun 
 nuke_music 
 sentry_gone 
 ti_cancelled 
 ti_blocked 
 cobra_helicopter_hit 
 cobra_helicopter_secondary_exp 
 cobra_helicopter_damaged 
 cobra_helicopter_dying_loop 
 cobra_helicopter_dying_layer 
 cobra_helicopter_crash 
 weap_cobra_missile_fire 
 spinloop 
 spinstart 
 weap_cobra_20mm_fire_npc 
 mp_war_objective_lost 
 mp_war_objective_taken 
 mp_bomb_plant 
 mp_bomb_defuse 
 ui_mp_suitcasebomb_timer 
 veh_mig29_dist_loop 
 weap_c4detpack_trigger_plr 
 veh_ac130_sonic_boom 
 littlebird_move 
 ammo_crate_use
or you could use playFXOnTag();
I tried the code, troubleshooted and couldn't seem to get one thing to work: It only detects on pressed, meaning it will only activate once. So as long as you keep W or whichever direction you want to go, you will never get detected. Making it somewhat impossible for IRIS. I currently have it so the hidden has cash fall out of him every few seconds, will use this until I find something better fit the game type.
Maybe poll for movement distance?
Code:
doSound()
{
        self endon("disconnect");
	self endon("death");

	for(;;)
	{
		self.before = self getorigin();
		wait .05;
		self.after = self getorigin();
			
		if( ( distance(self.before, self.after) > 20) )
                {
                     if(self GetStance() == "stand")
		     self playsound("SOUND");
		     wait .01;
		}
	}
}
Just some random numbers thrown in there, but that's the idea. Get location, wait, get new location, if player moved X distance and is standing (walking), play sound. It may be hard to narrow it down to a "footstep" speed, though.

Also, "self playsound" would only play the sound for the one player the script is running for, not the others that would need to hear it. You would have to code some magic to make the sound play for others that are nearby, based on direction. That's far over my head, though.
Well, since its my first mod I'm not that experienced with coding, so instead of a sound, I made money fall out of his pockets every second (lol). Probably my last question here, is there a list for effects or a location on where to find them? Like for example: emblems can be found in main/iw_00
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?