Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: amit14 on Tue 18/07/2017 07:47:37

Title: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 07:47:37
Hello, I am new to AGS and I wanted to make a nice adventure game using it. So I started learning about things I could make using this engine and read some guides related to it. but I wanted to learn some more topics which I could not find anywhere, like I learnt how to create NPCs but I don't know how to create enemies and make them attack the player and if they attack, how to make the player defend himself, so if someone could provide some light on these topics or could state any guide for such topics. I am confused if this question was to be posted here or somewhere else. Thank you!
Title: Re: some help related to some "above than beginner" topics
Post by: Khris on Tue 18/07/2017 08:25:10
What exactly do you mean by "create enemies", "make them attack" and "make the player defend himself"?
Like Double Dragon? Be specific.

If you want to create dynamic characters, you need to use arrays or structs. To show them on the screen, either draw everything yourself or use a bunch of dummy AGS characters.
Title: Re: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 08:33:07
I mean how to add some thrill in my game. All I have learnt about AGS is things like creating rooms, sprites for player and non player characters, lightning level, etc. But these all can't help me to create a game with all the thrills, so I want to learn how to create those thrills. I know I will have to create the enemies myself but how to make them attack the player. If you are able to understand what I mean.
Title: Re: some help related to some "above than beginner" topics
Post by: horusr on Tue 18/07/2017 08:35:10
Well, there is lots of topics about making combat systems, just believe in searching.
You can even make a fight game and there is some old module for it(probably won't work now but you can examine code) Ahmet's AGS Fight Game (http://www.adventuregamestudio.co.uk/forums/index.php?topic=20327.0)
And you could use some better subject for your post. Like "Creating enemies" kind.
Title: Re: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 08:42:41
thanks, I will try it. But I don't have any knowledge of setting timers, etc. So if I could get some help on that too.
Title: Re: some help related to some "above than beginner" topics
Post by: horusr on Tue 18/07/2017 08:47:33
Well, AGS's timers have just 2 functions: SetTimer(TimerID, Time) and IsTimerExpired(TimerID).
See manual for more help.
Title: Re: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 08:50:07
And I kept that subject because there are some more confusions.
Title: Re: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 09:02:26
alright, some more problems I will post soon.
(If these are cleared)
Title: Re: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 09:10:43
One more I remembered, suppose if i was able to create some enemies and they attack the player, is there any way to state how will they harm the player, like if the enemies are some animals, some would bite and some would throw damgerous objects like stones or poisons(snakes maybe). And also how much damage will they cause the player.
Title: Re: some help related to some "above than beginner" topics
Post by: Khris on Tue 18/07/2017 09:17:56
(Stop triple-posting! Think before you post, and if you want to add something, edit your post. This isn't a chat room.)

You're basically asking how to create enemy AI. You need variables and timers, maybe a basic state machine. This isn't really so much of an AGS problem as it is one of scripting in general.
Start simple, and go from there. It sounds like you're trying to run before you've learned to walk.
Title: Re: some help related to some "above than beginner" topics
Post by: horusr on Tue 18/07/2017 09:19:33
Well you need to create enemy struct I think.
Code (ags) Select
struct Enemy
{
  int damage;
//and some ther variables you want to use
};

Enemy bear;
bear.damage = 10;

Enemy snake;
snake.damage = 5;
Title: Re: some help related to some "above than beginner" topics
Post by: amit14 on Tue 18/07/2017 10:11:25
Quote from: amit14 on Tue 18/07/2017 07:47:37
Hello, I am new to AGS and I wanted to make a nice adventure game using it. So I started learning about things I could make using this engine and read some guides related to it. but I wanted to learn some more topics which I could not find anywhere, like I learnt how to create NPCs but I don't know how to create enemies and make them attack the player and if they attack, how to make the player defend himself, so if someone could provide some light on these topics or could state any guide for such topics. I am confused if this question was to be posted here or somewhere else. Thank you!
I think I started wrongly. I should start from beginning. Should i post here only or in beginner's forum.