Jump to content
The Dark Mod Forums

Triggering with a mover elevator


Garreth

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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();
}

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 3 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
×
×
  • Create New...