making AI for enemys and helpers & pause menu & level switch

Non-platform specific questions.

making AI for enemys and helpers & pause menu & level switch

Postby Darc » Sun Mar 29, 2009 8:17 pm

I'm making a game that requires AI and level switching and a pause menu and I need a easier way of changing the levels

any one know how to do any of this? or advice?
Image
User avatar
Darc
 
Posts: 16
Joined: Sun Mar 29, 2009 2:07 am
Score: 0 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby jimmynewguy » Sun Mar 29, 2009 8:49 pm

what kind of AI what do you want it to do?
plenty of demos on level switching and pause menus try searching :D
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby Darc » Mon Mar 30, 2009 7:33 pm

jimmynewguy wrote:what kind of AI what do you want it to do?
plenty of demos on level switching and pause menus try searching :D

like a helper that follows the player and fights with and jumps when needed/
and for enemy jumping dodging and stuff attacking,I haven't been able too find any pause menu demos or code sources
Image
User avatar
Darc
 
Posts: 16
Joined: Sun Mar 29, 2009 2:07 am
Score: 0 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby BlarghNRawr » Mon Mar 30, 2009 11:55 pm

like ice climbers in melee?
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby jimmynewguy » Tue Mar 31, 2009 2:46 am

well for attacking it depends on shooting or melee
melee = harder
shooting = hard but easier
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby jimmynewguy » Tue Mar 31, 2009 6:14 pm

the best answer and advice i can really give you is to fiddle around. Just use what you know and fit it together, it might not end up being exactally what you wanted, but it's better than nothing. If you just have someone tell you how to do it, you won't learn and you will keep having to ask for help. Once you find out you can do it, you will be a better problem solver, and will be able to make a full game and expand on your first AI script to make it how you wanted to. So, just try first, and if you run into bugs or are completly stuck, then ask. You will get alot more help alot faster if you have started the script and we just have to tweak it a little. Just trust me on this one if you ever trust me at all. That's how i got to be a "C+" student at GE :lol:
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby Darc » Tue Mar 31, 2009 8:51 pm

BlarghNRawr wrote:like ice climbers in melee?

egg-zactly
Image
User avatar
Darc
 
Posts: 16
Joined: Sun Mar 29, 2009 2:07 am
Score: 0 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby Darc » Tue Mar 31, 2009 9:02 pm

jimmynewguy wrote:the best answer and advice i can really give you is to fiddle around. Just use what you know and fit it together, it might not end up being exactally what you wanted, but it's better than nothing. If you just have someone tell you how to do it, you won't learn and you will keep having to ask for help. Once you find out you can do it, you will be a better problem solver, and will be able to make a full game and expand on your first AI script to make it how you wanted to. So, just try first, and if you run into bugs or are completly stuck, then ask. You will get alot more help alot faster if you have started the script and we just have to tweak it a little. Just trust me on this one if you ever trust me at all. That's how i got to be a "C+" student at GE :lol:

Well I guess I have away that includes more actors when I was making a Pikmin game but that game went down hill I'll use some of the sources though
Image
User avatar
Darc
 
Posts: 16
Joined: Sun Mar 29, 2009 2:07 am
Score: 0 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby skydereign » Tue Mar 31, 2009 11:23 pm

Depending on the complexity of the AI, it can be done with relative ease. The harder and more versatile the AI, the harder it will be to make. The basic structure of it is you are feeding the actor a bunch of triggers. It should know how to handle them. One case is to dodge. If you want it to dodge when an enemy attacks, one way of doing it is to tell it to jump. This also depends on how many enemies and players. But you should start with a basic idea and build from that.
Code: Select all
if (player.x-x<200 && ATTACK==1)
{
    // your dodge script... an example being
    //ChangeAnimation(jump);
    //yvelocity-=5;
}

This is not the best way of doing it, but it is one of the easier ways. To make this better, you would need to set up a pretty complex system that when used, the AI can determine what to do. As I said before, this is the basics. You can also throw in rand or other factors to make the AI less smart. That way it will only get it sometimes, or if you get farther into it, it has a choice and will pick, whether it is best or not. Level switching I am fairly certain there are demos on this. If you can't find any I can point you in the right direction. As for pause menus, I am not sure there is a built in way, but all you would need to do is disable the actors, either by the disable event or through your own means. The only actor that should receive events would be the menu. You could do it this way, though I hope there is a better way. In all actors you wish to pause, put an if statement in all of there events that allows them to move only when the menu is not up. I can explain further if need be.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby jimmynewguy » Tue Mar 31, 2009 11:28 pm

pause = PauseGameOn();
unpause = PauseGameOff();

but if you want a pause menu make a variable pause and for all actions on anything that will be paused use
if(pause == 0)
{
//actions
}
so it will only go it pause is off
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

Re: making AI for enemys and helpers & pause menu & level switch

Postby Darc » Wed Apr 01, 2009 9:23 pm

thanks now I think I have a better Idea of it
Image
User avatar
Darc
 
Posts: 16
Joined: Sun Mar 29, 2009 2:07 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron