Home   Help Search Login Register  

Author Topic: "Hiding" an Object  (Read 1650 times)

0 Members and 1 Guest are viewing this topic.

Offline Jimboob

  • Former Staff
  • ****
"Hiding" an Object
« on: 14 Mar 2007, 22:56:34 »
Hello,

Basically, I've got a multilayer mission (A role playing one typically) and I've got certain area's that I dont want people to get in but only one person can get in and out, Similar to nogville. I looked at the nogville scripts and it didnt make much sense to me.

So basiclly, what I want is a fence that can be "hidden" so people can move in and out from but only unhidden and hidden by one person.

Help appreciated!

Cheers

EDIT

Righto, I've got what I wanted working but now I've got the problem that the object doesnt stay in the same place that it was put during the start of the mission.

I'm using the following scripts to "hide" and then "unhide" the object.

Close gate
Code: [Select]
gate1 setpos [getPos gate1 select 0, getPos gate1 select 1, -10]; player removeAction closegate; goto "opengate"

#opengate
opengate = carman addaction ["Open Gate", "gate1o.sqs"]

Open gate
Code: [Select]
gate1 setpos [getPos gate1 select 0, getPos gate1 select 1, 0]; player removeAction opengate; goto "closegate"

#closegate
closegate = carman addaction ["Close Gate","gate1.sqs"]


Help appreciated.
« Last Edit: 15 Mar 2007, 11:40:10 by bedges »

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: "Hiding" an Object
« Reply #1 on: 17 Mar 2007, 04:34:28 »
If I recall, setpos doesn't work atleast in MP on particular objects (like fences :)  )
So in the few cases this is happen to me, I delete the object and then recreate it again as work around.

Xbox Rocks

Offline Jimboob

  • Former Staff
  • ****
Re: "Hiding" an Object
« Reply #2 on: 18 Mar 2007, 13:47:15 »
How would I go about that?