Hey everyone,
During development of my recent game I've been trying to devise a way to make the HUD sprite execute it's code before the bombs, and that before the Bomber so that the HUD doesn't erase the bomb stamps and the bomber detects the explosion. I devised a method that worked for the first round, but after the postgame carnage screen the ordering did not work (2nd round and above).
Click here to download the project.
Does anyone know how to make this work?
Thanks,
RHY3756547.
Offline
I don't understand 2/3 of the scripts in the game,but if you mean you need a way to clear the HUD without erasing the bomb explosion then just use a costume the same color as the background that stamps itself over the HUD.
Offline
Brass45 wrote:
I don't understand 2/3 of the scripts in the game,but if you mean you need a way to clear the HUD without erasing the bomb explosion then just use a costume the same color as the background that stamps itself over the HUD.
The stage needs to be cleared every frame for the HUD and the Bombs.
Offline
BWOG wrote:
I don't know what you mean.
This always happens when I ask for help.
OK - the UI and bomb effect are printed onto the stage.
The UI's code erases the stage and prints the UI
The Bomb's code prints an explosion graphic when it is exploding.
The player detected the explosion colour and if touching it dies.
The UI code needs to be executed before the bomb's explosion every frame otherwise the bomb is erased from the stage before the player detects the collision - thus the player does not die and the explosion is invisible. The player needs to be executed after the bomb otherwise the player will be detecting for something that hasn't happened yet.
So:
Sprite 1 in order:
UI erases stage => Empty Stage => Prints UI onto stage => UI printed
Sprite 2 in order:
Bomb querys if is exploding or not => if it is then it stamps the explosion => The explosion is now on the stage
Sprite 3 in order:
Stage has UI and explosions printed => Player detects if touching explosion colour => If it is then sets "Died?" to 1.
I need the sprites to execute the code in this way and no other.
Offline
Ah - i found out the issue. The order doesn't change if you re-call a broadcast that is already running (forgot to make the script stop when the bomb isn't placed)
Offline
Oh wow this is great
Unrelated to your problem: Yeah this is really impressive. Although may I reccomend using array-based collision like in my projects?
Related to your problem: I dunno
Offline
Lucario621 wrote:
Oh wow this is great
![]()
Unrelated to your problem: Yeah this is really impressive. Although may I reccomend using array-based collision like in my projects?
Related to your problem: I dunno
Array based collision is buggy and inaccurate. Sure - it is a tile based game (16x16) but normal collision is much less script intensive, simpler for potential remixers to understand and on the overall more supportive.
Offline
RHY3756547 wrote:
Lucario621 wrote:
Oh wow this is great
![]()
Unrelated to your problem: Yeah this is really impressive. Although may I reccomend using array-based collision like in my projects?
Related to your problem: I dunnoArray based collision is buggy and inaccurate. Sure - it is a tile based game (16x16) but normal collision is much less script intensive, simpler for potential remixers to understand and on the overall more supportive.
Says you >.>
Challenge me Should I make another engine lolz?
Offline
Hmmm i m mending it
OMG U GOT IT !!!!!!!
anyways but i dunno why it isnt opening the file
aarrrghhh why dont u use 4shared instead .
ARRGGGHHH HAVE U SEEN THAT INTERNET EXPLOER FIXES THE PROBLEM AUTOMATICALLY WHAT THE HELL MICROSOFT
Last edited by fanofcena (2010-01-03 00:31:21)
Offline