Good work on creating the new thread Meghcap! I kept telling myself to do so but then I'd just find myself posting in the original Swamp thread like everyone else, LOL!
Sneak that's a good idea, and something I hadn't thought of, to stop the timer between messages being displayed. Are you using some kind of enter event or something to enable it again? Hmm, that might be a cool way to let the player take the time they need to hear each message before hearing the next one. The code for playing the messages could still be spaced out in timer events, and all you'd need is a simple enter command to start the timer again after each message also stopped it! Sneak, I'm thinking that idea of yours is going to lead so some cool things in regards to telling longer stories in the campaigns.
Mehgcap, right now when items automatically respawn, they respawn as the same item they were when the player picked them up. I haven't spotted any easy way I can adjust that yet, but I'll keep it on my list of ideas to add.
Grryfindore, I'm very happy to hear that your campaign is working now.
Sneak and Truegamer, actually it isn't about differences between Swamp and BGT, and more just a difference in how the maps are handled. In CAE's map editor, he set the top left corner to be coordinates 0,0. In Swamp, I set that to be 1,1, which is something I do in nearly every tile based game I make, sighted or audio game. This is a little trick that saves an enormous amount of code at other places such as player movement and collision detection. When moving, you can normally check the tile to your left, or above, to find out if they are walls. If you are actually standing on coordinate 0,0 then you would get an out of bounds error with your arrays try to read -1,-1. The same is true if the left and bottom edges of your map are also at the limit of your arrays. You end up needing new code to check for those situations before even running the code you run at all other spots on your map, and that seems unnecessary and annoying to me. I shift my maps to 1,1 and dimension my 2D arrays to 1 more than I need in width and height, so I end up with a single tile thick buffer around my playable map area. The engine always considers that impassable terrain and now I never need any extra code to keep players from walking off of the map. So that's the reason behind the numbers being offset by 1.
Sneak, the lure only triggers once like a gun shot, you are correct. It creates an instant effect that gets the attention of the zombies and they head to investigate it, unless they were already chasing the player. They'd much rather chase a yummy brain-filled player than investigate an unknown sound, Hehe. Each additional Lure will overwrite the first, but that makes more sense once you do begin thinking of Lure as a quick burst of sound that only the zombies can hear.
It isn't really related to the current questions and comments, but while testing some stuff I threw together some sample script that counts how many coins a player has picked up, using the new command that will be in the next update. Here's the code, and perhaps it will give you guys an early understanding (and inspiration) on how the new command can be used.
map=lastman0
x=10
y=10
new var coins=0
item respawn
start timer
//fill the map with 50 individual coins
add items 50 1 1,1,[map.width],[map.height] -Coin
//every 10 seconds have this event trigger. In the event I reset the time to zero seconds so it loops forever.
//The item count command counts the coins the player has in his inventory, and stores it in my variable coins.
+-1+block time event m=0 s=10
item count coins=-Coin
say=You have collected [coins] coins.
set timer m=0 s=0
end event
I have a little time scheduled today for coding, so I hope I can get some great new things added!
Robjoy, thanks again for the quick reference.
- Aprone
Please try out my games and programs:
Aprone's software