jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 10, 2014 12:42:52 GMT
My computer has kicked the bucket while I was chewing over this problem last night so there is nothing I can do but for piece of mind has anyone had problems with the player not reappearing when killed off the initial game starting screen?.I have created four screens to my project but if I am killed on an adjoining screen I get the explosion lives are deducted and a new life does not appear.Dying on the original starting screen is fine .This may or may not be related, I have noticed I appear to be unable to delete the player sprite from the initial screen 00 so I have to play to get to screens I am designing,if I press 'D' to delete sprite on the sprite position screen it just refreshes and nothing happens.
|
|
|
Post by Jonathan Cauldwell on Feb 12, 2014 17:05:47 GMT
AGD needs to know where to respawn the player. If you define a player sprite on the other screens AGD will respawn the player at the relevant point when killed on those screens.
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 12, 2014 19:44:21 GMT
I see thank you Jonathan,my game is free roam not linear one direction so making your way back through an area entering from the right ,getting killed but respawning on the left of the screen is going to be weird.I have time to think about it anyway while my computer is being repaired,in the meantime I will continue making game layout on graph paper and noting ideas as i get them lol. Edit- Just having one life and energy bar would solve the respawning at wrong side issue of course but I prefer lives
|
|
|
Post by lukebord1 on Feb 15, 2014 11:12:38 GMT
Follow above Jon's instructions, then in Sprite#0 event, just before KILLing:
LET O = X LET P = Y
and then in INITIALISE SPRITE event:
IF TYPE 0 LET X = O LET Y = P ENDIF
In order to make it work, you should set O/P for the starting screen, so in GAME INITIALISATION set:
LET O = 80 LET P = 120 (example coordinates)
This way player will respawn in the same death point. That works in Land of Mire Mare, even if i had to add a routine to bring few seconds of invulnerability in order to avoid continuous deaths at certain screen points ;-)
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 16, 2014 18:17:59 GMT
Thanks Luke I will implement this into the game and see what happens.
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 18, 2014 12:47:59 GMT
Well it works fine (of course),I too need to add a loop or something now where collision is turned off after respawning for a while.I may make the character flash or something to signal invincibility.
|
|
|
Post by lukebord1 on Feb 18, 2014 22:58:17 GMT
I may make the character flash or something to signal invincibility. If you've seen my Land of Mire Mare (i don't consider it a masterpiece, but at least an AGD tips resource), you could use the same solution, as seen in many old arcade games - RND colour while invulnerability lasts ;-)
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 19, 2014 6:32:37 GMT
Yeah or I guess non agd games would cycle through the colours in a for a=0 To 7 loop but denoting colour on agd is different with bright,paper in same value.
|
|
|
Post by lukebord1 on Feb 20, 2014 23:41:13 GMT
Instead of a "0 to 7 colour cycle", i'd suggest a RND cycle like this:
GETRANDOM 7 (will generate 0 to 6 rnd number) ADD 65 TO RND (64 is bright, generally i prefer to exclude black, so add 1 for blue, and 65 will be the minimum value: bright blue) SPRITEINK RND
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 25, 2014 21:50:50 GMT
You say LOMM is a resource but is it possible to load it up in AGD because I seem unable lol,or was it just a figure of speech.My next problem is colour related because as in the instructions it says you need to use sprite ink in sprite events to prevent sprites leaving a trail of transparent coloured tiles as they move,this is my problem at the moment as I make the player flash but he leaves the trail of tiles ,so in the player 0 code I have inserted an instruction to colour the sprite 71 but I am getting a weird result where I prevent the trail of flashing blocks behind the player but when entering and leaving screens if you push towards a wall you turn it white (currently the players colour).I need to see example code.
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Feb 26, 2014 18:40:44 GMT
Nevermind just saw the question at WOS,I will try loading final block when I get home.
|
|
jammajup
Abandoned Uranium Working
Posts: 18
|
Post by jammajup on Mar 6, 2014 21:26:02 GMT
Okay I have the death sequence and flashing respawn,If the player respawns and moves into an enemie he does not die as expected but if the player reappears on top of a baddie during screen restart the player dies even with flashing and invincible instruction so I have something wrong in my loops somewhere.
|
|
|
Post by lukebord1 on Mar 6, 2014 22:44:24 GMT
Maybe you have to set a variable as a timer for the flashing loop, so when it's greater than 0, player cannot die.
|
|