AI shooting and using a ray

Show me your logic brick setup.Show me a screenshot.Show me it in action.

The object drops as soon as the scene begins. Once it has spawned into a new object, I can move it forward using the left mouse button. That isn’t what I want.

I don’t remember why it is that way.

But yes the object would spawn once the left mouse button has been clicked, preferably thrown forward, yes as the mouse button actually demonstrates that.

Attachments



Here is a nice fire effect you can use for your game.But it is not mine.I found the blend on youtube.It does not require many added
object to work.You can just parent it to your cube.Here is the youtube tutorials.WireSoul - Small features 10 [BGE fire]

Attachments

Fire.blend (1.04 MB)

Why can’t I use the one I created? I’m sure I can use the one that Thatimst3r had made three years back. I have already had to leave out a switch system for the arms, for the moment. I may not be able to get that working as should, so I really would like to leave what I’ve done.

Maybe someone else can help you.I do not know what else to suggest.

I don’t like the example, the one that I created should be fine. Unless, I have to remove four of six plane meshes, and just have one?

That example doesn’t contain six planes as one fire, and then three more in another layer.

Attachments


Could you maybe upload a vid to your current progress? or maybe your .blend?

https://youtu.be/-iPVTLGNbYI

You need to parent a empty to the cube which adds the flame.Select the empty then hold shift then select cube.Then you parent.If you are using a always sensor.You need to click the positive pulse on the empty’s logic bricks.Connect a delay sensor and a end object actuator together on the flame.Then make the delay a 200 on the delay sensor.

The fire cube has an always with the pulse on. I added the empty to the fire cube, that hasn’t changed anything.

Did you do all of what i typed on post 30?You need to do your part or else it is not going to work.

Yes I added the delay on the empty, And, Edit object- end object.

There is an always with a pulse on the fire cube, very first brick.

You add the flame to the empty with the always sensor connected to a add object actuator.What you do is drag the wire from the always sensor to the add object actuator then select the flame from the drop down menue.Then click the positive pulse.

I see, now a system is setup to activate a fire. May be an empty can be used for the match drop.

I do notice the third flame does seem to spawn further away than the two that are together. I tried rotating the empty, all that did was make sure the flames went upwards.

Having stated that, the flames only spawn where the flame cube is. So to randomly light a fire anywhere a feet or two away from the FP. The only alternative would be to parent the cube to the FP, and keep it at a distance. Then again I must not forget the stick, the match stick moves away, so once the stick has landed a few feet away then the fire is lit, not lite, and then the stick is still moving in front while the flames just spawn in the same positions.

Or may be that random brick may be of use.

Well the parenting actually works pretty good! As for the other flame, a bit odd why it doesn’t spawn in the same place.

Thanks for the hints Lost science.

You could spawn more cubes when you press a the keyboard key and just move the character around.

You know how to make health of a npc drop when you shot or burn them?

For the moment, I kind of want to get the fire spawning all in once place where ever it is set off.

And no I don’t know off the top of my head. I’d need to view some clips on how to do that.

It is easy just have the fire spawn from the empty.Meaning delete the other fire emitter.Don’t you want the cube to be invisible?

The empty is in front of the cube. The four flames are in the other layer which are linked to the cube.

The empty just spawns the fire in one place, but for what ever reason one flame is nearby and not spawning from where the empty is when ever I light a fire, it just loads nearby.