Jump to content

Recommended Posts

Posted

hello all, Scipting problem here...

EDIT:

 

Can someone look at this and tell me where i'm wrong, damm it !

 

 

 

Scn xxx

 

Short Open

 

 

Begin GameMode

 

If Player.GetDistance GateOpener >= 300

If open == 0

xxx01.playgroup forward 1

xxx02.playgroup forward 1

Set Open to 1

Debug;Message "Gate Openning"

EndIf

 

Else

 

If open == 1

If Player.GetDistance GateOpener < 300

xxx01.playgroup backward 1

xxx02.playgroup backward 1

Set Open to 0

Debug;Message "Gate Closing"

EndIf

EndIf

EndIf

 

End

Posted

It looks like you are headed in the right direction. You absolutely must attach this object script to gates which already have animation in the vanilla game.

 

Could you describe your set-up in greater detail? I assume you have two gates. Have you properly made them into references? You could probably get the same effect by making two scripts and attaching one to each gate. The lines would end up being:

Playgroup forward 1

playgroup backward 0

I just noticed that you used 1 when you should have used 0 on the second line.

 

I assume GateOpener is a an XMarker on the ground? The post does not say. Your radius is sort of small, depending on the application, a player may not step into your radius and the script would not execute.

 

This line and the similar one are wrong:

Debug;Message "Gate Openning"

 

I am not sure of your intention, but here are two ways to do it right:

;Message "Gate Opening"

Messagebox "Gate Opening"

 

It looks like it will be a cool script when you get done with it.

Posted

about the debug...its ok in game...its here that i put "debug" in front of the command...

 

about the gateopener, yeah, its a marker...

 

about the second code line using 1 again... you think this can be the problem ? i dont think this is the problem since the second command is "playgroup Backward" and not "Playgroup Forward Again"

 

about the fact that they are all reference...dont worry !

 

if the gate i use is one that is normaly activate by the player, and is one to be use in a cell (the gate is moving when activate) and not one use to link 2 cells... this is what you mean by using a correct gate, right ?

 

Thanks !

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...