Forums

  • Sat Jul 05 2008, 11:04pm
    Mon Jul 07 2008, 04:52pm  
    Mieveka
    Level 1

    EDIT: Got it working, see below how.

    So the thing is, how can I make a door or just a somekind of block that blocks the doorway, but when I click a remote button the block would move away from the doorway.
    This script I've been testing, but the block just moves to one spot at the beginning of the match and freezes there. So how can I make it to move away when I click the remote button.




    moving_door_1
    {
    spawn
    {
    wait 50
    trigger moving_door_1 start
    }

    trigger start
    {
    gotomarker moving_door_1_position_2 100 wait
    }
    }



    The other thing I have tested is a normal [func_door] and have put an [func_invisible_user] to open it remotely. It almost works, only thing is that I can still open the [func_door] "manually", just going next to it and open it normally, which I dont want to happen.


    I have also tried to modify an elevator script for my needs, with no success.
    Here's the elevator script. It works fine as an elevator, but it's a little too complicated for me to edit it for my needs.




    elev_trig1
    {
    spawn
    {
    accum 1 set 1
    }

    trigger lever1up
    {
    accum 1 abort_if_not_equal 1
    trigger lever1 down
    trigger lever2 down
    accum 1 set 0
    wait 2000
    trigger elev_trig2 setaccum0
    }

    trigger setaccum1
    {
    accum 1 set 1
    }
    }



    elev_trig2
    {
    spawn
    {
    accum 2 set 1
    }

    trigger lever1down
    {
    accum 2 abort_if_not_equal 0
    trigger lever1 up
    trigger lever2 up
    accum 2 set 1
    wait 2000
    trigger elev_trig1 setaccum1
    }

    trigger setaccum0
    {
    accum 2 set 0
    }

    }



    lever1
    {
    spawn
    {
    }

    trigger down
    {
    gotomarker elev_lever1_downpos 16 //speed of movement
    trigger lift open

    }

    trigger up
    {
    gotomarker elev_lever1_uppos 16
    trigger lift close

    }
    }

    lever2
    {
    spawn
    {
    }

    trigger down
    {
    gotomarker elev_lever2_downpos 16
    trigger lift open
    }

    trigger up
    {
    gotomarker elev_lever2_uppos 16
    trigger lift close
    }
    }



    lift
    {
    spawn
    {
    }

    trigger open
    {
    wait 500
    gotomarker path1 300
    }

    trigger close
    {
    wait 500
    gotomarker path2 300
    }
    }
  • Mon Jul 07 2008, 07:05am
      
    eb
    Level 1

    Yeah buddy, it is not so simple...you will need to learn a bit more.
    I suggest Ifurita's script reference:
    http://4newbies.planetwolfenstein.gamespy.com/Map_Scripting_4_Newbies.pdf
  • Mon Jul 07 2008, 03:47pm
    Mon Jul 07 2008, 04:45pm  
    Mieveka
    Level 1

    Got it working!
    Here it is; just replace those marked things with the name you come up with, anything you want, just use the same name on every [same marked] thing.

    [scriptname] // Put to [target_script_trigger] entities (by pressing N)= KEY:scriptname VALUE:[scriptname]
    {
    spawn
    {
    }
    trigger [target_script_trigger] // Put to [target_script_trigger] entities (by pressing N)= KEY:target VALUE:[target_script_trigger]
    {
    trigger [script_mover] [open] // "open" can be named anything you want, just use the same the later on [script mover]
    }
    }
    }

    [script_mover] // Put to [script_mover] entities (by pressing N)= KEY:scriptname VALUE:[script_mover] This shows you

    how to make [script_mover] http://fmc.hex.pri.ee/download.php?file=mover.rar, it includes video, *.map and *.script files. But you dont really need the
    *.script file, because it's right down there.
    {
    spawn
    {
    }

    trigger [open]
    {
    wait 500
    gotomarker [path_corner] 300
    }
    }

    // Put to [target_script_trigger] entities (by pressing N) = KEY:targetname VALUE:[func_invisible_user] AND to [func_invisible_user] entities KEY:target

    VALUE:[func_invisible_user]

    And the script without my comments, to make it more understandable.

    [scriptname]
    {
    spawn
    {
    }
    trigger [target_script_trigger]
    {
    trigger [script_mover] [open]
    }
    }
    }

    [script_mover]
    {
    spawn
    {
    }

    trigger [open]
    {
    wait 500
    gotomarker [path_corner] 300
    }
    }

    // Put to [target_script_trigger] entities (by pressing N) = KEY:targetname VALUE:[func_invisible_user] AND to [func_invisible_user] entities KEY:target VALUE:[func_invisible_user]

    So the door opens only once, you can also make a button that goes down only once, just edit / add things to the script / [script_mover]
    For a better door that opens multiple times and can be closed multiple times also, you can use the elevator script above or this file that includes *.map file. http://www.spyjuice.com/maps/elevator_lift.zip

    I hope there was everything added to my comments. Since I translated them from my mother language to english and I might haven't explained everything in my comments, because I maybe did skip some parts. And I dont bother to try fixing them anymore frown

    Just wanted to share this info for other desperate people, probaply for a trickjumping mappers, like me.
  • Mon Jul 07 2008, 05:42pm
    Mon Jul 07 2008, 05:42pm  
    Mieveka
    Level 1

    And a good site to make it more clear!
    It didn't work straight for me but it explains alot.
    http://www.surfacegroup.org/tutorials/script_mover/
Moderator(s): EasyRider, Nail, Warning!Mika

Welcome


Username or Email:

Password:




[ ]
[ ]
[ ]