Sign in to follow this  
Followers 0
BosnianArmy

Moving a xmodel helicopter

38 posts in this topic

Hello there,

 

I'm wondering whats the script for to move a xmodel helicopter ?? I know moveZ means it goes up but what are others 2? the Y and X ?

 

I need only the script that it goes forward with the brushmodel (clip_nosight_metal). If you can help me through it I would appreciate it.

 

 

-BosnianArmy

0

Share this post


Link to post
Share on other sites

Make the Xmodel a script_model, link the clip to the script_model (heli), Make the helicopter move UP to an origin in the sky, make origins for the path you want the helicopter to take. Here's the script:
 

Jumppad()
{
	trig = getEnt ("trig", "targetname");
	heli = getEnt("helicopter", "targetname");
	clips = getEnt("clipsandshit", "targetname");
	glow = getEnt ("glow", "targetname");
	org1 = getEnt ("heli_org1", "targetname");
	org2 = getEnt ("heli_org2", "targetname");
	org3 = getEnt ("heli_org3", "targetname");
	org4 = getEnt ("heli_org4", "targetname");

	clips enableLinkTo();

	time = 3;

	for(;;)
	{
		trig waittill ("trigger", player);

		if (player isTouching(trig))
		{
			clips linkto (heli);
			heli moveto (org1.origin, time);
			wait 1;
			heli waittill("movedone");
			heli moveto (org2.origin, time);
			wait 1;
			heli waittill("movedone");
			heli moveto (org3.origin, time);
			wait 1;
			heli waittill("movedone");
			heli moveto (org4.origin, time);
			wait 1;
			heli waittill("movedone");
			heli unlink();
		}
	}
}

Haven't tested it, report here if anything is fucked up with the script.

0

Share this post


Link to post
Share on other sites

Make the Xmodel a script_model, link the clip to the script_model (heli), Make the helicopter move UP to an origin in the sky, make origins for the path you want the helicopter to take. Here's the script:

 

Jumppad()
{
	trig = getEnt ("trig", "targetname");
	heli = getEnt("helicopter", "targetname");
	clips = getEnt("clipsandshit", "targetname");
	glow = getEnt ("glow", "targetname");
	org1 = getEnt ("heli_org1", "targetname");
	org2 = getEnt ("heli_org2", "targetname");
	org3 = getEnt ("heli_org3", "targetname");
	org4 = getEnt ("heli_org4", "targetname");

	clips enableLinkTo();

	time = 3;

	for(;;)
	{
		trig waittill ("trigger", player);

		if (player isTouching(trig))
		{
			clips linkto (heli);
			heli moveto (org1.origin, time);
			wait 1;
			heli waittill("movedone");
			heli moveto (org2.origin, time);
			wait 1;
			heli waittill("movedone");
			heli moveto (org3.origin, time);
			wait 1;
			heli waittill("movedone");
			heli moveto (org4.origin, time);
			wait 1;
			heli waittill("movedone");
			heli unlink();
		}
	}
}

Haven't tested it, report here if anything is fucked up with the script.

 

 

Ehm I ment only to move forward :P, but I guess this will help aswell ?

0

Share this post


Link to post
Share on other sites

It's not actually used in the script, I assume it was there because this person wanted to play a 'glow' effect but then took it out of the script at a later date?

 

Might be wrong, just a guess.

0

Share this post


Link to post
Share on other sites

Btw what I ment moving forward is this, I'm not sure if this script will work, if someone can fix this can I would be glad :P:

movehelicopter1()
{
	trig = getEnt ("movehelicopter1_trig", "targetname");
	heli = getEnt("movehelicopter1", "targetname");
	clips = getEnt("movehelicopterclipbrush1", "targetname");
	

	clips enableLinkTo();

	time = 3;

	for(;;)
	{
		trig waittill ("trigger", player);

		
	{
			
			
		
	movehelicopter1 moveY(121,1);
	movehelicopter1 waittill("movedone");
	
	wait 5;
	
	movehelicopter1 moveY(-121,1);
	movehelicopter1 waittill("movedone");
	
	
		}
	
}
0

Share this post


Link to post
Share on other sites

What was the point in this thread if you knew how to do it?..

 

I was asking for help if this script would not cause errors :> and I just figured out that Y is forward and X is right or left and Z is just up if I'm not wrong :P

0

Share this post


Link to post
Share on other sites

I was asking for help if this script would not cause errors

Test the fkn thing and you'll see if you get any errors :angryarnold:

 

 

I just figured out that Y is forward and X is right

:facepalm:

0

Share this post


Link to post
Share on other sites

Learn basic scripting before creating a map, the whole syntax is wrong on your code above, i've seen you making maps for dr for like 1 or 2 years now, and you still don't know the basics of scripting?

 

Also, don't wanna sound rude or anything, but a 5th grader probably knows the x, y and z axis, a quick google search would've done it. about your heli problem, it depends in what direction your heli is looking at radiant shows you the x and y axis

6af7ce4ca4b10325b44472f3319895a6.png

0

Share this post


Link to post
Share on other sites

Learn basic scripting before creating a map, the whole syntax is wrong on your code above, i've seen you making maps for dr for like 1 or 2 years now, and you still don't know the basics of scripting?

 

Also, don't wanna sound rude or anything, but a 5th grader probably knows the x, y and z axis, a quick google search would've done it. about your heli problem, it depends in what direction your heli is looking at radiant shows you the x and y axis

6af7ce4ca4b10325b44472f3319895a6.png

 

 

We sir never use X Y Z in Netherland, only if you are going for metal and that such stuff but in general nope. And btw the script doesn't work.

 

I'm getting this error:

 

fd84fca0e97ca61195281457448c26d7.png

 

 

And I knew that already about the Radiant X Y Z

0

Share this post


Link to post
Share on other sites

Possibly because movehelicopter1 is the thread name not the entity on the helicopter, I'm going to let you solve this on your own. Look at the move script part, and the thread name. That's all i'm saying for now.

0

Share this post


Link to post
Share on other sites
getToTheChoppa()
{
	choppa = getEnt( "choppa", "targetname" );
 
	if( !isDefined( choppa ) )
		return;
 
	direction = anglesToForward( choppa.angles );
	startpos = choppa.origin;
 
	choppa moveTo( 121 * direction, 1);
	choppa waittill( "movedone" ); // <-- ?? never used this one lel
 
	choppa moveTo( startpos, 1 );
	choppa waittill( "movedone" );
}

dunno if this is what ya want or if this even works. ya shud learn basic scripting before trying to do stuff n things.

 

if netherlands doesnt use X Y Z, then what? A B C?  :dumb:

0

Share this post


Link to post
Share on other sites

We sir never use X Y Z in Netherland, only if you are going for metal and that such stuff but in general nope. And btw the script doesn't work.

 

I'm getting this error:

 

fd84fca0e97ca61195281457448c26d7.png

 

 

And I knew that already about the Radiant X Y Z

Bosnian holy fuck. You didn't even give "movehelicopter1" a getEnt lol.
0

Share this post


Link to post
Share on other sites

:facepalm:.. I over view that part.. forgot to change it though.. thats when you get stressed and forget some things >: :facepalm:

0

Share this post


Link to post
Share on other sites

OK.. now I'm getting a error with this.. trig waittill( "trigger", user );

 

 

Undefined is not an object

 

 

 

 

These are the scripts:

removeplanebridge()
{
trig = getEnt ("removeplanebridge_trig", "targetname");
removeplanebridge = getEnt ("removeplanebridge", "targetname");


    trig waittill( "trigger", user );
	user iPrintLnBold( "You activated this ^9deadly ^7trap!" );
	
	trig delete();
	

 while(1)
{
 removeplanebridge hide();
 removeplanebridge notSolid();
	wait 2;
	removeplanebridge show();
	removeplanebridge Solid();
	wait 5;
}
}
removeplayerclipladder5()
{
trig = getEnt ("removeplayerclipladder5_trig", "targetname");
removeplayerclipladder5 = getEnt ("removeplayerclipladder5", "targetname"); 


   trig waittill( "trigger", user );
   user iPrintLnBold( "You activated this ^9deadly ^7trap!" );
	
	trig delete();
	

	{
	removeplayerclipladder5 hide();
	removeplayerclipladder5 notSolid();
	wait 5;
	removeplayerclipladder5 show();
	removeplayerclipladder5 Solid();
	wait 1;
	}
}

0

Share this post


Link to post
Share on other sites

:facepalm:.. I over view that part.. forgot to change it though.. thats when you get stressed and forget some things >: :facepalm:

Look over your script and take time to figure out the problem before you post here.
0

Share this post


Link to post
Share on other sites

Look over your script and take time to figure out the problem before you post here.

 

I took time now for the error what I've posted above your comment. And I have no idea why I am getting this error since I copied and paste it because its the same trap as the other one but in a another name and yes I checked the radiant and in the gsc

0

Share this post


Link to post
Share on other sites

Why do you have "user iprintlnbold" ?

0

Share this post


Link to post
Share on other sites

Also use: Trig waittill ("trigger", player);

0

Share this post


Link to post
Share on other sites

Why do you have "user iprintlnbold" ?

 

For the text You activated this ^9deadly ^7trap! ?

 

And it works yes

0

Share this post


Link to post
Share on other sites

Also use: Trig waittill ("trigger", player);

 

player causes the problem aswell

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