Another in-valid script... - by 37637598
37637598 on 10/8/2004 at 02:02
I don't know if you guys know much about scripting, but i really need an answer.
Here's the thing. This script works...
*********************
Begin Mkb_Disable
short DoOnce
if ( Doonce == 0 )
if ( OnActivate == 1 )
Disable
"Mkb_Fire01"->Enable
set DoOnce to 1
endif
endif
end
*****************************
This one doesn't work...
*******************************
Begin Mkb_Disable
short DoOnce
if ( Doonce == 0 )
if ( GetDistance, Player < 200 )
Disable
"Mkb_Fire01"->Enable
set DoOnce to 1
endif
endif
end
***************************
Why??? Absolutley NOTHING happens.
Can anyone help? :(
Striker on 10/8/2004 at 02:18
What is the script attached to?
37637598 on 10/8/2004 at 05:19
a bush, activator.
Anovus on 10/8/2004 at 05:36
I am not an expert scripter, but maybe that can help.
EDIT: EDIT:Oh. The only problem is this line:
if ( GetDistance, Player < 200 )
Try quotation marks around player.
Once again, don't laugh at me because I'm not an experiance scripter, i'm only trying to help lol
Striker on 10/8/2004 at 06:15
You only need quotation marks around an ID if there are spaces. In this case, it will work either way.
OK, so the bush doesn't Disable at all? (You could try doing the Disable after the Enable and SET DoOnce TO 1 Line). Put something like:
IF ( GetDistance, Player < 200 )
MessageBox "Close enough!"
That will let you know if the GetDistance part fires.
37637598 on 11/8/2004 at 04:40
well, i figured it out.
********************
Begin Mkb_Disable
short DoOnce
short Done
if ( Doonce == 0 )
if ( GetDistance, Player < 200 )
set DoOnce to 1
endif
endif
if ( Doonce == 1 )
if ( Done == 0 )
Disable
"Mkb_Fire01"->Enable
set Done to 1
endif
endif
end
**********************************
Thank you for all the help. I spent so much time trying to figure it out. i tried all of the suggestions. the MessageBox helped alot.