Alliedassault           
FAQ Calendar
Go Back   Alliedassault > FPS Gaming General Discussion > MoH Maps, Mods & Skins
Reload this Page Scripting Problem
MoH Maps, Mods & Skins Discuss custom maps, skins and mods here.

Reply
 
Thread Tools Display Modes
Scripting Problem
Old
  (#1)
an-innocent-civilian is Offline
Junior Member
 
Posts: 14
Join Date: Mar 2002
Location: Almere, The Netherlands
  Send a message via MSN to an-innocent-civilian  
Default Scripting Problem - 08-31-2002, 01:36 PM

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
  
Reply With Quote
Old
  (#2)
sputnik is Offline
Junior Member
 
Posts: 24
Join Date: Apr 2002
  Send a message via AIM to sputnik Send a message via MSN to sputnik Send a message via Yahoo to sputnik  
Default 08-31-2002, 01:53 PM

For the elevator, try downloading DaCrapper's Elevator prefab and checking your script.
  
Reply With Quote
Old
  (#3)
an-innocent-civilian is Offline
Junior Member
 
Posts: 14
Join Date: Mar 2002
Location: Almere, The Netherlands
  Send a message via MSN to an-innocent-civilian  
Default 08-31-2002, 02:11 PM

I know how the elevator works, I jsut need an answer on my question. thanks anyway.
  
Reply With Quote
Old
  (#4)
G3mInI is Offline
Senior Member
 
Posts: 270
Join Date: Mar 2002
 Send a message via ICQ to G3mInI  
Default 09-01-2002, 01: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
  
Reply With Quote
Old
  (#5)
an-innocent-civilian is Offline
Junior Member
 
Posts: 14
Join Date: Mar 2002
Location: Almere, The Netherlands
  Send a message via MSN to an-innocent-civilian  
Default 09-01-2002, 07: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????
  
Reply With Quote
Old
  (#6)
G3mInI is Offline
Senior Member
 
Posts: 270
Join Date: Mar 2002
 Send a message via ICQ to G3mInI  
Default 09-02-2002, 03:46 AM

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

moveeast
movewest
movenorth
movesouth


G3mInI
  
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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