|
Post by gabriele1969 on May 19, 2014 22:11:21 GMT
..after the player gets killed?
|
|
|
Post by alessandro on May 20, 2014 12:15:10 GMT
Hi Gab, I believe it would be possible, but it's rather long-winded and most probably not worth it. The only way you have to drop an object your character is carrying is through a PUT command. It will be dropped at the character's current location. If you need an object to "disappear" after you use it you could set an unreachable 16x16 pixel area with the same INK and PAPER so that you translate your character there, let it drop the object (it becomes "invisible") and immediately go back to the previous position. I did this for some puzzles in Cronopios y Famas. About your question: you would need to set the KILL PLAYER event so that the screen is changed to the one the object is initially found in and at the same coordinates, then go back to the previous screen at the same position your character was occupying at the time of dying, display the character's death animation (if any) and respawn it. You could als do it the other way round if you like but it would not change much, since you would need to make the character respawn in the same screen where it died. A major pain in the neck if you ask me, I'd avoid it altogether. Anyway I would not recommend you to do anything with AGD until Jonathan fixes the bug I recently found, even if you do not plan employing text messages. There is something wrong in the memory management which could corrupt game data, and that is something you would definitely not want to happen. Myself, I am working at the intro and end game sequences of Cousin Horace now.
|
|
|
Post by gabriele1969 on May 20, 2014 17:50:12 GMT
ok I pondered about this and read what Alex wrote so I came out with this which works pretty well
essentially if the player takes the object a variable "k" goes from 0 to 1 (i use this for a number of objects so i say "if obj>...; if obj<=...") when the player is about to be killed (in my case when time runs out), if k=1, then let x=...and y=... put ...(object number) and then kill
this works well for a single-screen game like "Albert the wolf"(you get killed, restart from the same screen, but never go back... you can check my progresses in the dorpbox folder); for and adventure kind of game (i agree with Alex) it would be much more complicated..
and yes there is something wrong with the text message routine...oh well
|
|