I have to be honest and say that I'm not entirely sure what your problem is. (I can't run the code because I don't have the media (and I'm too lazy to create any))
I don't understand what you mean by this sentence:
However, here are a few pointers:
I see that you definitely don't need these lines:
You definitely don't need to set the entitytypes every frame of you game:
I suspect that this code::
I don't understand what you mean by this sentence:
But I can't figure out how to make the targets revolve around the gun.
What targets are you talking about? Please try to be more specific about what targets your are referring to, what gun you are referring to, and what exactly you mean by revolving (I know what revolving means, but I don't know how YOU want your targets to revolve).However, here are a few pointers:
I see that you definitely don't need these lines:
FreeEntity xo FreeEntity yo FreeEntity zo FreeEntity xo2 FreeEntity yo2 FreeEntity zo2in your PutBadmans function. Those variables contain entity locations not entity handles. You are just freeing random entities which either actually does free random entities in your game or they (the FreeEntity commands) just fail (which is what probably happens 99.999999% of the time).
You definitely don't need to set the entitytypes every frame of you game:
For hit.badman = Each badman EntityType hit\entit,1 PositionEntity hit\entit,hit\xo,hit\yo,hit\zo Next For hat.badman2 = Each badman2 EntityType hat\entit2,1 PositionEntity hat\entit2,hat\xo2,hat\yo2,hat\zo2 NextDo that when you initialize your badmen like in this For-Next loop:
For tt= 1 To 20 hit.badman = New badman ; where did HIT come from... I made it up. I could hit\entit = CopyEntity (badman) ; have used a letter or any word not reserved hit\xo=Rnd(-100,100) ; NOTE " \ " not " / " hit\yo=Rnd(-50,50) hit\zo=Rnd(100,150) ; Since B3D uses both + and - nums I had to use Rnd EntityType hit\entit,1 Next ; That way my badmans are spread out evenly-ish
I suspect that this code::
For hit.badman = Each badman PositionEntity hit\entit,hit\xo,hit\yo,hit\zo Nextis intended to not only set the badmens locations but you actually want to use it to UPDATE the badmens locations? If that's the case then you need to add some line in there something like:
For hit.badman = Each badman hit\xo = hit\xo + rnd(-.1, .1) hit\yo = hit\yo + rnd(-.1, .1) hit\zo = hit\zo + rnd(-.1, .1) PositionEntity hit\entit, hit\xo, hit\yo, hit\zo NextNote however, that using the above code will just cause them to wiggle around a bit. But since I don't know what you mean by revolve, I don't know how you actually want them to move.