Jump to content

Recommended Posts

Hello! I need help with ICARUS scripts. I don't know English well and it's just hard for me to translate tutorials. Can somebody tell me the steps to follow? Please?

I'm trying to make a rotation. Tried to adapt a script from vjun2 but it did not work.  (model that should rotate just disappears from the map).

Link to comment

Post a picture of your script, and a picture of the entity window with your mover entity selected, and we can get you all set! Most likely, your issue is the lack of an origin brush, but it's hard to say without seeing the aforementioned items.

Also, to help with debugging scripts, type /developer 1 in the game console. Everything a script does will print to the console.

Link to comment
7 minutes ago, NAB622 said:

Post a picture of your script, and a picture of the entity window with your mover entity selected, and we can get you all set! Most likely, your issue is the lack of an origin brush, but it's hard to say without seeing the aforementioned items.

Also, to help with debugging scripts, type /developer 1 in the game console. Everything a script does will print to the console.

For the first test, I chose misc_model

 

Script:

------------------------

rem ( "comment" );

affect ( "space", /*@AFFECT_TYPE*/ FLUSH )
{

    task ( "rotate" )
    {
        rotate ( < 5.000 5.000 5.000 >, 1.000 );
    }


    loop ( -1 )
    {
        dowait ( "rotate" );
        wait ( 0.000 );
    }

}
------------------------

GxThR2m.jpg

 

W8qW8AI.jpg

 

ahHqJH9.jpg

 

Link to comment

Okay, yeah I see why you're confused.....I'll start from the top with this one and try to clear everything up.

Firstly, target_scriptrunner is unnecessary in most cases, although it's perfectly valid to use it. If you're firing the script with a trigger, you can use a trigger_multiple with a usescript value and it will have the exact same effect.

On to the entity setup...

Scripts can move func_ entities (Except func_group), so you'll need to set up your mover that way. func_doorfunc_wall and func_static are all valid movers. (I hate func_static, but that's another thing entirely). To have your script move that particular mover, you'll need to use an affect block in your script (Which you have), and on the entity you'll need to set a script_targetname to match. Any movement you apply will now directly affect the entity. Make sure you use an origin brush as part of your entity, so rotations don't get messed up.

Now, it looks like you have a misc_model involved with your mover. Misc_model will not move on it's own. You need to set it's "Target" value to be the targetname of whatever func_ entity you want it to follow. Right now you have it targeting the target_scriptrunner, which won't do anything.

For the script, you're using a task within a loop. Unfortunately, all this will do is rotate the affected mover 5 degrees on all 3 axes, and then stop. Moves and rotations are applied directly to the vector and angle values on the entities, so applying a rotate 5 5 5 more than once will make no changes. Furthermore, you don't really even need the task for that - just apply the rotation directly. Is your desired affect to make the entity rotate over on all 3 axes? If so, check out this script from Taspir Power Complex V3 that rotates a vortex cube over the center of the map:

Spoiler

 


//Generated by BehavEd

rem ( "comment" );
use ( "t1615" );

affect ( "center_vortexes", /*@AFFECT_TYPE*/ FLUSH )
{
	rotate ( < 0.000 0.000 0.000 >, 0.000 );
	wait ( 2.000 );

	loop ( -1 )
	{
		use ( "nothing" );
		use ( "nothing" );
		rotate ( < 45.000 90.000 45.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 90.000 180.000 90.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 135.000 270.000 135.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 180.000 360.000 180.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 225.000 90.000 225.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 270.000 180.000 270.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 315.000 270.000 315.000 >, 1500.000 );
		wait ( 1000.000 );
		rotate ( < 0.000 0.000 0.000 >, 1500.000 );
		wait ( 1000.000 );
		use ( "nothing" );
		use ( "nothing" );
	}

}

 

 

 

The use t615 line at the top triggers the mover, which is a func_wall, between being visible and invisible.

The use "nothing" blocks are there to pad the loop, since there's a bug in JA that rearranges the first and last blocks of loops.

 

Good luck, hopefully this helps! Any further questions, post back and I'll try my best to help.

Edited by NAB622
Clarity
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...