Hello, I'm trying to make a game for SGDK but I'm having a few troubles figuring a few things out. I'm hoping someone can help me with a few scripting problems...
1) Script for collision
I know this is probably something simple, but I can't find how to do collision with scripting. I want to do my shooting all in scripting because of the way I'm doing damage.
2) Random Damage on collision (for enemy and player)
I want whenever an emeny or player shoots a bullet collides with the other to do some amount of damage plus a random number so that it looks something like:
'On collision
Health = 20 - diff*(rand(-5,5))
Where health is the enemy or players health, diff is the difficulty rating (0.7, 1.0, 1.3) and it adds some random number between -5 and 5. Is doing something like this possible?
3) Player sprite switching
I tried this earlier so that when the player shoots, the script changes the player sprite for a short amount of time and then back but I couldn't really get it to work. How do you make a script that changes the player sprite for x time and then back to the original while creating a bullet sprite that moves away from the player in a straight line?
I've tried making my shooting with special functions, but I'm just having a weird problem I can't really figure out and neither can anyone else so I want to try it this way with scripting instead. Whenever I shoot using the special function, the sprite changes and makes a bullet where I want it to go, just the bullet doesn't really go anywhere. It has speed, no gravity, follows path relative to player, and path vector, it just sits there for some odd reason.
Thanks for any help you can give!