2019-07-25 21:21:48

Hi
How would I be able to go about creating enemies that walk towards the player and do certain amount of damage, and how would I make items that would be able to be picked up and used for example, ammunition, potions, and stuff like that, Thanks for any help given

2019-07-25 22:43:48 (edited by Aaronlp 2019-07-25 22:45:35)

Hey sky.
Its probably quite a long answer for that question if I was to explain all the needed code but I can give a quick explanation on how i have made enemies and items.

If you would like to see a working example of items the witch hunt game gde project is downloadable from the sonus game library.

Basically I had a variable for each item. Such as potions. And when the player object collided with a obtainable potion object, the potion object would play a little audio, increase the potion variable count and then destroy itself.

As for enemies coming  towards a player. I set 2 global variables to keep track of the players X and Z coordinates. Every time the player moves these variables get updated.

Then in an enemy periodical event they check If they are higher or lower than the player coordinates and adjust their own by 1. Then you can adjust how fast you want the enemy to move by adjusting the delay property on the object.

It's probably not a simple answer but I do plan on making a tutorial about It. Both of these will be included in the fighting game tutorial series.

Hope this helped a bit.

2019-07-25 23:05:14

Thanks very much, I will see what I can do, One more question, how would maps be created with the gde

2019-07-25 23:11:48

I had both these same exact questions. I am looking to make a fighting game of sorts in the gde, and i don't know how to go about making maps, and i now know about how to make enemies, thanks for that.

2019-07-26 10:19:18

Essentially the game starts with a big infinite map. As it's only comparing coordinates and they can be as big as you want.

But to transfer from one area to another I normally create an object responsible for loading in all the next area objects and also have it use the clear all objects action to remove the previous "area" before loading all the new objects in.

2019-07-31 20:53:36

Hi all, guys! Today I was completing the Farm Tutorial on the GDE page and was thinking of doing a sort of Bomber Man game in wich you are in a grid and when you locate an enemy you can put a mine in the cell but you have a limited time for doing this and the each enemy disapears after, say, 5 seconds. you have to reload your weapon from time to time. You have a certain number of enemies in the grid and your goal is to try to eliminate all of them. Would it be possible doing such a thing using gde? It would be just a small example of the charatteristics of GDE; do you have suggestions? Thanks for your help!

Claudio