Do we have already fire in hf?


#1

I would like to have fire in hf, but don’t know how to build. Is texture animation possible?


#2

You’ll need to use the new system particles that were introduced two weeks ago. They were unfortunately not explained and caused many crashes; and are currently under-development.

My guess is someone will create a fire.js once the new particle system has been solidified.
@ericrius1 introduced the particle system and @Adrian has been pushing anxiously about it.

Thanks all I know for now.


#3

Yes, I have tried it and I’m not crashed. But if I use a png texture, so the transparent part is black until now.


#4

It is a begin :smiley: I have made it with rezing of easy flat entities with a timer script:


#5

Have you tried using animation sprite to make you flames. I am not an expert on JavaScript but I found this tutorial that you could adapt or hack to create flames.
Javascript Game Tutorial Part 1

You only need the part of the code the runs the sprite. I imagine you would have to put your images in your scripts folder.

I am not sure how to embed the video here sorry


#6

I haven’t tried until now, but will do in the next time :smiley: To embed a video here you only must post the link.

Meantime I have improved my fire script a bit, so that the flames also move, when the fireplace is moved. Maybe this script could be usefully also for other things.

Here you can get it: https://dl.dropboxusercontent.com/u/48725104/fire.js If you start it the fireplace will be rezed and the flames.


#7

thanks for the script


#8

I have added a domain check now to the script. So it also can run, if you teleport and it will stop. If you are back in the domain, where you have rezed the fire, it will start again.

https://dl.dropboxusercontent.com/u/48725104/fire.js


#9

Do you mean only the person running the scripts sees the fire?


#10

The fireplace and the fire can see all. But the fire will burn only as long, as you run the script at the domain. This dos mean, you must be on the place. Sure, this isn’t the best way, It would be better, if a script would run in the fireplace. Will think about it.


#11

I have thought about a script, which I could put in the fireplace. But to get the position of the fireplace, I need the entityID. Isn’t there a function, which gives the entityID of the model, where the script is in?