Home   Help Search Login Register  

Author Topic: Addaction?  (Read 613 times)

0 Members and 1 Guest are viewing this topic.

AshkenaZ

  • Guest
Addaction?
« on: 14 Jun 2005, 13:30:08 »
I need some help..

I'ved used the Addaction command, on a pallet.
My idea is a kind of teleporting, to another pallet there is in the air!.

When a man uses the Action, He should be teleportet to the other pallet.
But it should work for more than one man, at different times.
(It should work on the Man who usses the Action)

How to do ???

I thought of a script there could identify the man who used the Action?
And then use the setpos (Getpos ) command on him!



Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Addaction?
« Reply #1 on: 14 Jun 2005, 14:08:01 »
the comref has some valuable info on this, depending on which version of flashpoint you're using.


Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Addaction?
« Reply #2 on: 14 Jun 2005, 14:08:48 »
If you check the comments in the comref on addAction you will see:

Quote
So an example of an action-based script goes like this:

_obj = _this select 0
_man = _this select 1
_index = _this select 2

So add the action to the pallet and when the script is run
_this select 0   will be the pallet and
_this select 1    will be the unit that actions the action

You will need to have the script know which pallet to send him to and it should then be simply be:

_man setPos getPos nameofotherpallet


EDIT: 47 seconds - what was I doing?
 
« Last Edit: 14 Jun 2005, 14:10:03 by THobson »

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Addaction?
« Reply #3 on: 14 Jun 2005, 17:46:40 »
In simplier words :P
I would try in the pallets init this addaction ["Warp!","Warp.sqs"]

And for the warp.sqs
Code: [Select]
player setpos [(getpos Name_Of_Floating_Pallet select 0),(getpos Name_Of_Floating_Pallet select 1),(getpos Name_Of_Floating_Pallet select 2)+1]
exit
« Last Edit: 14 Jun 2005, 17:47:46 by RujiK »
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Addaction?
« Reply #4 on: 15 Jun 2005, 06:40:07 »
wow, its been a long time since i did this last.
THobson has it right:
in the pallets init, put:
this addaction ["warp","warp.sqs]

warp.sqs:
Code: [Select]
_warper = _this select 1
_warper setpos getpos pallet_in_the_sky



...like riding a bike :P

Offline Garcia

  • Members
  • *
  • Leeds United is the best football team...EVER!
Re:Addaction?
« Reply #5 on: 15 Jun 2005, 14:09:19 »
well, it would be best if it looked like this:

Quote
_warper = _this select 1
_warper setpos [(getpos Name_Of_Floating_Pallet select 0),(getpos Name_Of_Floating_Pallet select 1),(getpos Name_Of_Floating_Pallet select 2)+1]

cause if you don't setpos him a bit over the pallet, he most likely will be setposed in the middle of the pallet, and will then fall down.

AshkenaZ

  • Guest
Re:Addaction?
« Reply #6 on: 16 Jun 2005, 09:15:27 »
Thx.

It works  ;D