Sign in to follow this  
Followers 0
Speedex

Gsc scripting problem

2 posts in this topic

Hey,

 

I have this trap which is suppossed to push player of a edge by moving a trigger upwards for like 7 sec. and then move down again, when players step into the trigger they get bounced sideways of the edge. The problem is that the trigger don't move upwards, but when I noclip into the trigger it still bounces me sideways.

 

Gsc:

trap2()
{
	link1 = getent("link","targetname"); //link for moveplayer brush
	trap2_trigger = getent("trap2_trigger","targetname"); //acti trigger
	trap2_moveplayer_trigger = getent("trap2_moveplayer_trigger","targetname"); //trigger which pushes players of the edge
    //trap2_fxorigin = GetEntArray("trap2_water_orig","targetname"); //fx origin array
	//level._effect["water"] = loadfx ("misc/water_gush_reverse"); //load watergush fx
	trap2_moveplayer_trigger enableLinkTo();
	trap2_moveplayer_trigger linkTo(link1);
	// Wachten tot op de knop wordt gedrukt
	trap2_trigger waittill("trigger");
	trap2_trigger delete();
	//trap2_fxorigin playsound ("mortar_explosion1");
	//for( index = 0 ; index < brush.size ; index++ )
	//{
		// Put a while loop here if you want it to loop
		//playfx (level._effect["water"], trap2_fxorigin.origin);
	//}
	
	while(1)
	{
		trap2_moveplayer_trigger waittill ("trigger",user);
		if (user istouching(trap2_moveplayer_trigger))
		{ 
			user braxi\_common::bounce( vectorNormalize( user.origin - (user.origin - (0,-1,0)) ), 500 );		
		}
	}

	link1 moveZ(80,1);
	wait 7;
	link1 moveZ(-80,1);
	wait 1;
}

I hope someone knows how to solve this.

 

-Speedex

 

Sorry for any grammar errors  :ph34r:

0

Share this post


Link to post
Share on other sites

You have it so the link1 moves up and down at the beginning of the round. There is nothing to make it wait until the player is at the trigger, just put those 4 lines after the waittill and it should work

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0