hi everyone!
just wondering if anyone has had any success in making a supporting NPC.
i know you can make slave gadgets and ghosts attack enemies, and even make an NPC that hurts any gadget (indiscriminate damage), but is there a way to make a separate gadget attack enemies and not hurt the player?
Page 1 of 1
friendly NPCs making a gadget that can help the player?
#3
Posted 03 June 2011 - 01:29 PM
i know it sounds simple, but there are some quirks in IG Maker that make it a little tricky.
as far as i am aware, if a gadget is not a 'player' gadget (or a slave/ghost of the player), it is automatically grouped into the 'everything else' category of gadgets. the 'everything else' category doesn't seem to be able to identify other gadgets besides the player as being 'unique.' thus, an 'everything else' gadget is automatically set up to take damage from the player and not harm the other 'everything else' gadgets.
if you turn on the indiscriminate damage option, the gadget can hurt other non-player gadgets, but still damages (and is damaged by) the player.
since you can't classify things as anything besides 'player' and 'everything else,' trying to get an NPC gadget to go attack enemies on its own AI is proving quite challenging.
maybe i'm just missing something very simple?
as far as i am aware, if a gadget is not a 'player' gadget (or a slave/ghost of the player), it is automatically grouped into the 'everything else' category of gadgets. the 'everything else' category doesn't seem to be able to identify other gadgets besides the player as being 'unique.' thus, an 'everything else' gadget is automatically set up to take damage from the player and not harm the other 'everything else' gadgets.
if you turn on the indiscriminate damage option, the gadget can hurt other non-player gadgets, but still damages (and is damaged by) the player.
since you can't classify things as anything besides 'player' and 'everything else,' trying to get an NPC gadget to go attack enemies on its own AI is proving quite challenging.
maybe i'm just missing something very simple?
#4
Posted 15 June 2011 - 04:10 AM
That's possible to make, I did for my friend, who is doing a Pokemon type of game, with action (and not RPG) battle system.
The first thing you need to know is about the difficulty, it's near of the hard work spend to make a good AI code in C#.
So, to make the NPC become an ally, you'll need to make two character inside the "player" gadget. It's like how I did 2 players games.
First, you make all the poses for the main character, after, you do all the poses for the ally, if it's an AI, do all the system to make him the best Smart as possible, so, make the player shot the ally and tcharam! you can detect this players in the screen. but don't think that's finished.
Doing this way you'll create a big problem. All the AI using player detection will bug, because they can't detect who is the real player, but you can make a good AI inside the ally, because he will know who is the player.
If that's not the problem, just make a simple gadget with a good AI and shot him by the player, this gadget never will hurt the player.
I do my AI with many secrets what I wouldn't share here for pioneer purposes, but I can tell you that's possible to make an ally detect and attack enemy gadgets, but how it's possible is the big secret behind the AI.
Make sure you're using all the conditions offered by the IGM, there you can workaround about 99% of all problems involving detection.
The first thing you need to know is about the difficulty, it's near of the hard work spend to make a good AI code in C#.
So, to make the NPC become an ally, you'll need to make two character inside the "player" gadget. It's like how I did 2 players games.
First, you make all the poses for the main character, after, you do all the poses for the ally, if it's an AI, do all the system to make him the best Smart as possible, so, make the player shot the ally and tcharam! you can detect this players in the screen. but don't think that's finished.
Doing this way you'll create a big problem. All the AI using player detection will bug, because they can't detect who is the real player, but you can make a good AI inside the ally, because he will know who is the player.
If that's not the problem, just make a simple gadget with a good AI and shot him by the player, this gadget never will hurt the player.
I do my AI with many secrets what I wouldn't share here for pioneer purposes, but I can tell you that's possible to make an ally detect and attack enemy gadgets, but how it's possible is the big secret behind the AI.
Make sure you're using all the conditions offered by the IGM, there you can workaround about 99% of all problems involving detection.
#5
Posted 16 June 2011 - 04:24 AM
hey telles, long time no see!
i hadn't thought of making the ally gadget out of a projectile, but that sounds like it might work. i'll give it a try. thanks!
i hadn't thought of making the ally gadget out of a projectile, but that sounds like it might work. i'll give it a try. thanks!
#6
Posted 19 June 2011 - 10:40 AM
Ive been trying to figure this scenario out too.
I havent tested this yet, but here's what I was thinking:
-Create a non player gadget that does not damage the player.
-Give the non player gadget all A.I. requirements for movement, attack, etc
-During the non player attack, trigger a memory that will deduct X amount of damage from enemy, when the enemy is nearby.
The only problem is, if there are more than one instance of that enemy on screen, will damage subtract from all instances of that enemy?
Again, I havent tried this out yet...just a theory.
I havent tested this yet, but here's what I was thinking:
-Create a non player gadget that does not damage the player.
-Give the non player gadget all A.I. requirements for movement, attack, etc
-During the non player attack, trigger a memory that will deduct X amount of damage from enemy, when the enemy is nearby.
The only problem is, if there are more than one instance of that enemy on screen, will damage subtract from all instances of that enemy?
Again, I havent tried this out yet...just a theory.
#7
Posted 21 June 2011 - 04:08 AM
that's an interesting theory, and it would probably work if each active enemy was unique, or at least had a unique instance in the gadget registry. however, that sounds like a lot of AI planning, which i would imagine will get tiring very quickly...
i honestly haven't gotten much further with the friendly NPC lately, but it sounds like there are several approaches that will probably work. thanks for everyone's input so far! hopefully we'll be able to come up with a great solution!
i honestly haven't gotten much further with the friendly NPC lately, but it sounds like there are several approaches that will probably work. thanks for everyone's input so far! hopefully we'll be able to come up with a great solution!
#8
Posted 22 June 2011 - 08:24 AM
crystalpencil, on 19 June 2011 - 10:40 AM, said:
Ive been trying to figure this scenario out too.
I havent tested this yet, but here's what I was thinking:
-Create a non player gadget that does not damage the player.
-Give the non player gadget all A.I. requirements for movement, attack, etc
-During the non player attack, trigger a memory that will deduct X amount of damage from enemy, when the enemy is nearby.
The only problem is, if there are more than one instance of that enemy on screen, will damage subtract from all instances of that enemy?
Again, I havent tried this out yet...just a theory.
I havent tested this yet, but here's what I was thinking:
-Create a non player gadget that does not damage the player.
-Give the non player gadget all A.I. requirements for movement, attack, etc
-During the non player attack, trigger a memory that will deduct X amount of damage from enemy, when the enemy is nearby.
The only problem is, if there are more than one instance of that enemy on screen, will damage subtract from all instances of that enemy?
Again, I havent tried this out yet...just a theory.
Interesting things here. Following your path I can figure out a very good solution.
If you can do a GOOD AI for the Ally, you should do:
* Player in a different layer of the Enemies;
* Ally in the same layer of the Enemies;
* The red collision box of the player should be in the same layer of the enemies;
Tcharam, the ally can attack the Enemies, but can't hurt the player, but you lose one layer of your game (it's fine, you have more 3). But what's about the enemie attack, how they will hurt the ally and the player? Easy, make them to have a gadget slave, with exactly same animations, but displaying in the player and in his own layers =)
Share this topic:
Page 1 of 1