Hi, i wanted to ask for a good method on fight system. Like. What’s better, ray or near. Or what’s a better set-up for a fight system. I’m gonna use it for my game. It’s kind of like asking for a non-glitchy method that makes the player really feel attacking the enemies. So… Anyone have a good method?
I don’t know what your Ray or Near Sensors would do, but you might make a Near Sensor that checks for an Enemy within Range and let Beck track to that Enemy.
(Either placing an Empty at the hitPosition or hitObject.worldPosition and then activating the TrackTo Actuator or by usin’ the BGEHelper TrackTo Thingy.)
That way Beck would not necessarily track to anything except for when there actually is an Enemy, then he also would face the nearest Enemy while attackin’.
Perhaps have your character animated (punches, sword slashes etc) and parent a box to the fist or sword so that when it hits an object with a certain property it causes damage? The reverse would be true for enemies (so the enemy ‘punches’ look for the property ‘player’ etc).
You could then make each body part (head etc) react in different ways by having a parented hit box, for example, a punch to the head would deal x 2 damage.
Just some thoughts.
Well, is having a targeting system good for my game? Cause my game will consist waves and waves of enemies. It’s not good when attacking them one by one. Is there any better set up?
Well I did not say anything about One-by-One Targeting System. You Sword would still hurt anyone it hits. Or use Radar instead of Near, so only Enemies infront of Beck would be tracked to.
It simply adds a felt Believability if your Character faces whom he fights instead of just punching into the Air.
I think that’s a pretty good idea. But would make some scripting. Anything else anyone likes to add?
This can be an effective way fast for “ton’s” of enemy:
when an enemy attacks you create a new object. (which survives only 1 frame,must place it in perfect position,at right frame)
for example, an enemy gives you a punch, add an object “damageFromEnemy” with property [“Punch”]
another enemy gives you a kick, add an object “damageFromEnemy” with property [“kick”]
so no need to check all 100 enemies but only objects “damageFromEnemy” (probably no more 1 at frame)
This should give you a boost
the reverse instead, player VS enemy not give very advantage
But I do not know if you can change properties with logic bricks.
with python only write:
###for obj enemy
if event==1:
add=bge.logic.getCurrentScene().addObject(“damageFromEnemy”,ob,1)
add[“punch”]=1
add.worldPosition[0]+=1.2#set the right position
add.worldPosition[1]+=-1#set the right position
add.worldPosition[2]+=1.1#set the right position