Home   Help Search Login Register  

Author Topic: Moving wall! [solved]  (Read 1122 times)

0 Members and 1 Guest are viewing this topic.

Offline danturn

  • Members
  • *
Moving wall! [solved]
« on: 05 Jul 2009, 01:34:26 »
Quote
Ok, I have created a military base using the real time editor and added 5 sections of wall to act as a gate named Gate_a - gate_e. I have used setpos so that when addaction 'opengate' is activated, the wall disapears so the base is accessable. I have basically just set the position of the wall to -15m. the open action dissapears and a close action is added which when activated brings the wall back to it's original position... or so i had hoped, instead the wall shifts over slightly to the right (facing it from inside the base).

Anyone got any ideas why this would be happening and how i conquer it?

the open_gate.sqs script is as follows...

Code: [Select]
gate_a setpos [getpos gate_a select 0, getpos gate_a select 1, -15];
gate_b setpos [getpos gate_b select 0, getpos gate_b select 1, -15];
gate_c setpos [getpos gate_c select 0, getpos gate_c select 1, -15];
gate_d setpos [getpos gate_d select 0, getpos gate_d select 1, -15];
gate_e setpos [getpos gate_e select 0, getpos gate_e select 1, -15];

closegate = gatekey addaction ["Close Gate", "close_gate.sqs"];

Gatekey removeaction opengate;

and the close_gate.sqs ...

Sorted it, just used coordinates instead of setpos'ing to its name.

Code: [Select]
gate_a setpos [getpos gate_a select 0, getpos gate_a select 1, 0];
gate_b setpos [getpos gate_b select 0, getpos gate_b select 1, 0];
gate_c setpos [getpos gate_c select 0, getpos gate_c select 1, 0];
gate_d setpos [getpos gate_d select 0, getpos gate_d select 1, 0];
gate_e setpos [getpos gate_e select 0, getpos gate_e select 1, 0];

opengate = gatekey addaction ["Open Gate", "open_gate.sqs"];

gatekey removeaction closegate;

gatekey being the object used for the action.

Thanks in advance
« Last Edit: 05 Jul 2009, 12:40:59 by danturn »