The Dink Network

Reply to Re: Local variable problem

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 7th 2009, 05:05 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
So I can't reliably run a loop in the main procedure? (does it get interrupted when it's hit?)

I added the &stunduration = 20 in the hit procedure to test it. In reality it's going to be a global variable that acts like a constant throughout the game. So, if I don't add it in the hit procedure and I use the goto command in the hit procedure, hitting it 20 times in a row will actually subtract one from the duration each time, overwriting the timer mechanic of the main procedure. I hope that makes sense :/ I think I'll try it with the sp_custom key feature which seems to be new (??).

EDIT: I tested it and hitting an enemy indeed ends the main procedure. Something to keep in mind if you want to do anything in that procedure I guess. Still leaves me with the problem that I can not use variables in the hit procedure that I declared in the main procedure. Weird stuff. Guess I'll follow Rob's suggestion and just live with the potential exploits