Page 1 of 1
Hey guys I have a question
Posted: Fri Apr 08, 2005 1:05 am
by Zandor 12
Is it possible for an object to #send itself to different labels while it's #locked? Because I'm having a lot of trouble with some animations in an RPG battle I'm working on for the game I said I'd have done four months ago but then :ssssss: happened and video killed the radio star so yeah. I know that a #locked object can't be #sent by other objects, but can it still manipulate its own code or am I going to have to take the hard route and mess with the /is by trial and/or error?
Posted: Fri Apr 08, 2005 1:30 am
by Ando
Put in a box full of pineapples. That'll teach 'em.
Posted: Fri Apr 08, 2005 1:51 am
by Dr. Dos
:bob
#zap billy
IMPORTANT CODE THAT MUST OCCUR BEFORE :BILLY HAPPENS
#restore:billy
#end
:billy
I HOPE THAT IMPORTANT CODE HAPPENED.
:billy
#end
Posted: Fri Apr 08, 2005 2:56 am
by Zandor 12
This is the code, I probably should've posted it earlier:
Code: Select all
@You
#end
:react
#lock
#play t+++fffe
#char 153
#play --c+c-d#+d#
#put w purple boulder
#char 148
:ne
:ne
:ne
:ne
:ne
#put w purple boulder
#put w purple boulder
#zap ne
#send self:ne
:ne
#restore ne
#unlock
#end
I cut out a lot of irrelevant stuff, the full object is almost 3kb. The point of this is that one of the enemies in the RPG battle fires a laser by #putting w purple boulders and then doing a bunch of #changes. The laser pierces through the character, by way of the character being sent to :react at just the right moment and #putting more boulders to complete THE MAGICAL ILLUSION. But for some reason, he only goes through the loop once before ending. I'm at something like 19,770 bytes so I have basically no room left, hence the loop. The #lock is because due to space I have to use some #send others:dndndndn to move objects out of the way of the laser.
...only that occurs long before the character gets hit by the laser...
Well, I've lost track of my own code. Back to ZZTAE.
Posted: Fri Apr 08, 2005 3:17 am
by Zandor 12
It turns out that the code was working perfectly after all. I had some inivisible objects in the path of the laser, and I set them to move further into the laser when it fired instead of moving out of its way, making the laser all garbled and stuff.
This thread is now about Tetris.
I say the best version is Tetris DX