Jump to content
The Dark Mod Forums

Recommended Posts

Posted

I made a elevator it has 3 floors, When the elevator comes close to a door there is a block that moves trough a trigger multiple block wich is supposed to controll the 3 floors doors, but nothing happens, i dont think a trigger reacts on a mover.

Normaly the trigger should react, i have made arrow triggers like that.

How can i controll doors on 3 floors to open and close?

mbr7zb.jpg

Taf you, you taffin taffer

Posted

Are you open to scripting?

 

There are spawnargs you can place on the atdm:mover_multistate_position at each floor:

 

"call_on_arrive" "<script function name>"

 

"call_on_leave" "<script function name>"

 

When the elevator arrives at a floor, the m_m_p at that floor will call the "call_on_arrive" script function.

 

When the elevator leaves, the m_m_p at that floor will call the "call_on_leave" script function.

 

Each of these script functions can trigger whatever activities you want to occur when arriving or leaving.

Posted

For example, you might have on the m_m_p:

 

"call_on_arrive" "ArriveFirstFloor"

"call_on_leave" "LeaveFirstFloor"

 

And the script functions could just open/close the elevator doors.

 


void ArriveFirstFloor()
{
    $ElevatorDoorLeft1.Open();
    $ElevatorDoorRight1.Open();
}

void LeaveFirstFloor()
{
    $ElevatorDoorLeft1.Close();
    $ElevatorDoorRight1.Close();
}

Posted

I get an error when i run the script

 

File "<string>", line 1

void ArriveFirstFloor()

^

SyntaxError: invalid syntax

 

 

 

 

void ArriveFirstFloor()

{

$atdm_mover_door_sliding_1.Open();

$atdm_mover_door_sliding_4.Open();

}

 

void LeaveFirstFloor()

{

$atdm_mover_door_sliding_1.Close();

$atdm_mover_door_sliding_4.Close();

}

 

 

i dont know anything of scripting.

Taf you, you taffin taffer

Posted (edited)

a

 

void main()

{

sys.print("map script running.\n");

}

 

is needed as the last function in the script file, else you get a script error.

it always goes at the end of the script file, its primaly use is to run scripts needed at start of map, eg like a clock with hands.

Edited by stumpy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...