How to script an elevator in an aircraft carrier?
#1

I just mapped a carrier in my server, but I would like to have that elevator in the carrier, so I can drive my hydra upon it, and lift it on the upper deck, just to add more realism. A command like /elevator would be okay.


Thanks in advance.
Reply
#2

you would need to use MoveObject
Reply
#3

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
you would need to use MoveObject
How? Do I need a whole piece of script for that, or is it easy?
Reply
#4

Its easy, you first map the position of the elevator, then you replace that object to the position where the elevator has to end, then you get have the two positions, then look up a tutorial for MoveObject, (usaly they use gates, but its the same thing).
Reply
#5

Could you give me a link for the MoveObject tutorial? XD
Reply
#6

Heya, I Remember when I was Learning MoveObject Try Doing This.....
OVER "Ongameinit"
Make

new (name of Gate or Lift :P ) ;

Then Under "OnGamemodInit"

(Name of Gate or Lift) = CreateObject(information);


Then Make a Command like

/lift
{
MoveObject(name, Coordinates);
return 1;

-----------------------------------
all that will only work if you Know how to use Createobject :P
Reply
#7

Quote:
Originally Posted by Matthew_Johnston
Посмотреть сообщение
Heya, I Remember when I was Learning MoveObject Try Doing This.....
OVER "Ongameinit"
Make

new (name of Gate or Lift :P ) ;

Then Under "OnGamemodInit"

(Name of Gate or Lift) = CreateObject(information);


Then Make a Command like

/lift
{
MoveObject(name, Coordinates);
return 1;

-----------------------------------
all that will only work if you Know how to use Createobject :P
I know how to insert coordinates and stuff, but could you explain me what part of it makes the object move, and is there a certain range of the object? I would like to have a certain 'range' on it, like, you only can start the elevator if you're near to it.
Reply
#8

My guess is using IsPlayerInRange.
Reply
#9

Could anybody post a good and clear tutorial for me? o.o
Reply
#10

Not a tutorial but its pretty clear how it works from the example.
https://sampwiki.blast.hk/wiki/MoveObject

You will find most of the things you need to know from the wiki.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)