Alliedassault

Alliedassault (alliedassault.us/index.php)
-   MoH Maps, Mods & Skins (alliedassault.us/forumdisplay.php?f=11)
-   -   Scripting Problem (alliedassault.us/showthread.php?t=8424)

an-innocent-civilian 08-31-2002 12:36 PM

Scripting Problem
 
I'm working on a part of my map (sniper range) and made a script, but I don't get a small thing.

I I want a object to move up, I'll just set "time" and "move up #" like:

$movingobject time 3

$object_ trigger waittill trigger

$movingobject moveup 64

But when I press the trigger again I don't want the object to move higher, but to move down again.

I a elevator I used:

local.elepos = 1/0

Is that elepos thing predefined somewhere, cause it won't work when I use something like:

local.objectpos - 1/0

Can anyone help me?

Grtz

AIC

sputnik 08-31-2002 12:53 PM

For the elevator, try downloading DaCrapper's Elevator prefab and checking your script.

an-innocent-civilian 08-31-2002 01:11 PM

I know how the elevator works, I jsut need an answer on my question. thanks anyway.

G3mInI 09-01-2002 12:45 AM

heres a simple script example that should help you out ...


first call it by a thread somewhere in the beginning of your map.scr file...

thread moving_object

moving_object:

$movingobject time 3 //sets the time in seconds object will move the distance scripted

$object_ trigger waittill trigger

$movingobject moveup 64
$movingobject waitmove // this line waits for the object to complete the move before moving on to the next line

$object_ trigger waittill trigger // after it has moved up, now wait for the same trigger to be pressed again

$movingobject movedown 64 // move it down
$movingobject waitmove // wait for the move again

thread moving_object // repeats the process in an endless loop


hope that helps ya

-g3mini

an-innocent-civilian 09-01-2002 06:40 AM

thanks for the help, I finally got it to work. I forgot to set the time.

An other question, I know the "moveup" and "movedown" commands, but is there a way to make something move to a side????

G3mInI 09-02-2002 02:46 AM

depending on which way is north on your map you can also use the following....

moveeast
movewest
movenorth
movesouth


G3mInI


All times are GMT -6. The time now is 02:13 AM.

Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.