Scripted lift.
-
incenseman2003
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
Scripted lift.
I have been banging my head against the wall trying to get a scripted lift to work. I have tried 22 different ways and have deleted them out of frustration. All I need is the lift to go up and down. I have the actor created with the proper animation. All I need now is the script to make it work. I have done a bit of scripting and have gotten simple things to work before. Im just really lost on this one.
Since the MovingPlatforms dont let me go as high as I need them to, I have to do it this way.
Can someone post a simple script that will do what I need, or at least tell me the commands to use?
Since the MovingPlatforms dont let me go as high as I need them to, I have to do it this way.
Can someone post a simple script that will do what I need, or at least tell me the commands to use?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
I think the easiest way would be to use MoveToPoint() command in highlevel, but it doesn't seem to work when vertical movement is included. Another way to do that is to use Move() command. Just set AngleX to 90 or -90 and it should move up and down. I hope this gets you going. 
Pain is only psychological.
-
incenseman2003
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
I used the folowing command and the actor didnt even spawn.
"{
Move(upanddown, 5, 20, 0 , 90, 0);
}"
"upanddown" is the name of the ".mot" file that I gave the ".act" file when I built it.
I just want the lift to go up and down in a loop.
I admit to being in over my head on this one.
Im losing my hair because of the malfunction in my chair to keybaord interface.
"{
Move(upanddown, 5, 20, 0 , 90, 0);
}"
"upanddown" is the name of the ".mot" file that I gave the ".act" file when I built it.
I just want the lift to go up and down in a loop.
I admit to being in over my head on this one.
Im losing my hair because of the malfunction in my chair to keybaord interface.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
If the actor doesn't even spawn then there's something seriously wrong with your script or setup. Check the RF log and make sure everything is OK in the pawn attribute fields (in the editor).
BTW, animation names should have " symbols.
Move("upanddown", 5, 20, 0 , 90, 0);
BTW, animation names should have " symbols.
Move("upanddown", 5, 20, 0 , 90, 0);
Pain is only psychological.
-
incenseman2003
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
I have tried the following script and the ".act" spawns now, but it does not go up and down.
{
IDLE [upanddown]
Start[ ()
} ]
Idle[ ()
{
Move("upanddown", 5, 10, 0 , 20, 0);
RestartOrder();
} ]
}
Getting closer.
{
IDLE [upanddown]
Start[ ()
} ]
Idle[ ()
{
Move("upanddown", 5, 10, 0 , 20, 0);
RestartOrder();
} ]
}
Getting closer.
Last edited by incenseman2003 on Mon Mar 12, 2007 12:43 am, edited 1 time in total.
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
try posting your whole script
its on highlevel rite?
you could try making the animation go up and down, and make it just play animation.
PlayAnimation(char *Animation, bool State, char *Sound )
or an animation that does nothing and use move cmd
Move(char *Animation<--IDLE anim here, float Speed, float Distance, float AngleX , float AngleY, float AngleZ, char *Sound );
its on highlevel rite?
you could try making the animation go up and down, and make it just play animation.
PlayAnimation(char *Animation, bool State, char *Sound )
or an animation that does nothing and use move cmd
Move(char *Animation<--IDLE anim here, float Speed, float Distance, float AngleX , float AngleY, float AngleZ, char *Sound );
Herp derp.
-
incenseman2003
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
I have also tried the following script:
---------
{
IDLE [upanddown]
Start[ ()
} ]
Idle[ ()
{
PlayAnimation("IDLE",true)
RestartOrder();
} ]
}
------------------
Im still pretty new to scripting. That might not be right.
Is it?
---------
{
IDLE [upanddown]
Start[ ()
} ]
Idle[ ()
{
PlayAnimation("IDLE",true)
RestartOrder();
} ]
}
------------------
Im still pretty new to scripting. That might not be right.
Is it?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
your script just has no reference to idle order
put play animation in Start[ () order
you could also try making the platform a pawn, and make boundingbox animation to upanddown that way you don't need a script methinks. but i could be wrong.
put play animation in Start[ () order
Code: Select all
{
IDLE [upanddown]
Start[ ()
HERE!<------------------------------------|
} ]
Idle[ ()
{
/\
PlayAnimation("IDLE",true)MOVE TO----|
RestartOrder(); MOVE TO
} ]
}Herp derp.
-
incenseman2003
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
I am sorry to report that after making the changes you mentioned that there is still no up and down movement of the pawn lift.
Im beginning to wonder if this can be done at all.
If we cant get a lift to go higher then 500 texels, that could be seen as a bug.
Couldnt it?
Im beginning to wonder if this can be done at all.
If we cant get a lift to go higher then 500 texels, that could be seen as a bug.
Couldnt it?
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.
- QuestOfDreams
- Site Admin
- Posts: 1525
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
use the Console command for debugging your scripts
there are several mistakes in your script: the Start order is missing a {, IDLE is a variable not a string so it must not be enclosed in "", the PlayAnimation command takes 3 parameters
However, you should not use an animation for the movement if you want to use the pawn as a platform, but actually move it. Also you need to set the Pawn to be a vehicle to be able to ride it.
there are several mistakes in your script: the Start order is missing a {, IDLE is a variable not a string so it must not be enclosed in "", the PlayAnimation command takes 3 parameters
Code: Select all
{
IDLE[upanddown]
Start[()
{
// do setup stuff here
Console(true);
// go to new order
NewOrder("Idle");
}]
Idle[()
{
PlayAnimation(IDLE, true, "");
RestartOrder();
}]
}
Last edited by QuestOfDreams on Mon Mar 12, 2007 11:15 am, edited 1 time in total.
- QuestOfDreams
- Site Admin
- Posts: 1525
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
-
incenseman2003
- Posts: 320
- Joined: Sat Mar 11, 2006 11:41 pm
I have created many levels where the MovinPlatfom does the same thing as a lift.
Here is one I made from scratch just for the purpose of posting you to see.
It is made from new (just for this experiment) default install of RF with the 75c patch applied.
The MovingPlatform has no extra settings. It to is default.
Here is the 3DT file.
If you really want test it the best way I have posted it as a playbel level below.
http://files.filefront.com//;6915487;;/
Here is one I made from scratch just for the purpose of posting you to see.
It is made from new (just for this experiment) default install of RF with the 75c patch applied.
The MovingPlatform has no extra settings. It to is default.
Here is the 3DT file.
If you really want test it the best way I have posted it as a playbel level below.
http://files.filefront.com//;6915487;;/
- Attachments
-
- rfeditpro1.rar
- (3.02 KiB) Downloaded 107 times
Patience and tolerance are the keys to the passage of knowledge. Even those that are the most knowledgeable started with many questions.