path_corner problem


(aowblacky) #1

Hey,

first of all, this isnt my first script_mover … but i have no idea why this isn’t working… :confused:

PROBLEM: map doesnt start. error: G_Scripting: can’t find entity with “targetname” = “crane1_high”

i have 2 path_corners and both have a targetname.
(see attachment)
(2nd is exactly the same, with targetname “crane1_low”)

here’s my script:

crane1_button
{
    trigger activate
    {
        globalaccum 4 abort_if_not_equal 0  
        globalaccum 4 set 1      
        wm_announce "Crane will move in 5 seconds!"       
        wait 5000      
        trigger crane1 move
    }
}

crane1
{
    spawn
    {
        globalaccum 4 set 0
        gotomarker crane1_high 10
        setstate crane1_speaker invisible
    }
    
    trigger move
    {        
        playsound sound\movers\elevators\elev1_start.wav
        setstate crane1_speaker default
        gotomarker crane1_low 4000 wait
        setstate crane1_speaker invisible
        playsound sound\movers\elevators\elev1_end.wav

        wait 3000
        
        playsound sound\movers\elevators\elev1_start.wav
        setstate crane1_speaker default
        gotomarker crane1_high 4000 wait
        setstate crane1_speaker invisible
        playsound sound\movers\elevators\elev1_end.wav
        
        wait 50
        globalaccum 4 set 0
    }
}

(Loffy) #2

If you haven’t done it yet, try a wait in the script, just to let the entities spawn into the game at match start. Could do the trick.

I always use path_corner2. They are an updated version of path_corner, and it just felt right to start using them when I map.

A third thing is that I often give my entities both a scriptname and a targetname. In this case “targetname” = “crane1_high” and “scriptname” = “crane1_high”. It is just something that I do.


(aowblacky) #3

nice one. worked :slight_smile:
thx