fantomEngine built-in functions

Monkey Forums/Monkey Programming/fantomEngine built-in functions

trainer(Posted 2013) [#1]
Hello Everyone ..
Can anybody tell me if there is any built-in function inside fantomEngine framework that let me make some echo or flash on a specific object, which I want the player to notice to click on it depending on the voice instructions..

What I'm asking about is the built-in functions that will let me make my game more entertaining ..


MikeHart(Posted 2013) [#2]
Häää????? Echo???? Flash???? Define echo. Is it a sound effect? Define flash.
Do you mean that it lights up?

Sorry, but english is not my native language so it could be that I didn't understand what you ment.


rIKmAN(Posted 2013) [#3]
I'm sure fE will have a way to handle animation frames, although I don;t use it so not sure of the specific commands.

Find those, and then you can set the animation for that specific object so it will "flash" and draw the users attention to it.

When they select the object, you can then go back to the normal static image (frame 1 etc)


trainer(Posted 2013) [#4]
Ammm .. let me explain what I want clearly
-----------------
obj.CreateTransRot(360,800, True,1)
obj.SetScale(1)
-----------------
Those are a functions inside the fantomEngine..isn't ?

I'm just looking for such function which allow me to let some object flashing .. I mean it appears and goes in at most two seconds and keeps coming and leaving continually until I click on it ..

I hope that what I want is clear now .. :/


MikeHart(Posted 2013) [#5]
Yes, these are functions in fE.

Ok, you want to alpha fade it in and out. There you would use ftObject.CreateTransAlpha and then in ftEngine.OnObjectTrans fire the opposite. Give me a few minutes and I will post a little example.


MikeHart(Posted 2013) [#6]
Here you go:



It also shows how to use custom objects with fE and how to utilizes some of fE's callback methods.

Have fun
Michael


trainer(Posted 2013) [#7]
Waw .. It looks so great ..

I will apply this on my game now

Thank you so much :)


MikeHart(Posted 2013) [#8]
Glad you like it.


Ken(Posted 2013) [#9]
Hiya,

Monkey newbie here.

I'm just trying to get this running so I can see how it's working...but first fantom engine wasn't found, then I copied that into my working directory.

Then it was the JSON module missing. I took this to mean it was the JSON stuff written by warpy. I copied that into my working directory.

When i ran it, I'm now told JSONDataItem not found.

The docs are are rather sparse when talking about modules. Is there a module manager? Are modules stored in a system-wide place?

Thanks for any input.

-Ken


MikeHart(Posted 2013) [#10]
When you download fE, it comes with a JSON module. And it says on the download page to copy it in your modules directory too. But i will add this info to the docs too.


MikeHart(Posted 2013) [#11]
Modules are stored inside monkeys module folder or a userdefined folder which you then need to specify inside the config file under modpath.

Edit: There is no module manager to my knowledge.


Ken(Posted 2013) [#12]
Does it? Really?

I downloaded fantomEngine_V150.zip, unpacked it into my modules directory, and no joy:
Module 'json' not found.

Tried on both Windows and Mac.

If I copy the json directory from MonkeyPro70b/bananas/warpy/json into the modules directory, I get the error
Type 'JSONDataItem' not found.

Again, both Windows and Mac.

...and no json directory anywhere. In fact, the download page also mentions Box2D, whch would be cool to see, but no Box2D directory either.

Am I simply looking in the wrong place?

-Ken


MikeHart(Posted 2013) [#13]
I will check, maybe i have forgotten to include it. Sorry.


MikeHart(Posted 2013) [#14]
Ok, I have uploaded a new backage. This time, WITH the box2D and json module. Sorry for the confusion.


ordigdug(Posted 2013) [#15]
I expanded this example a bit and included some additional comments. Mike, feel free to use all or part.

NOTE: Uses font.png & font.txt (Can grab from FathomEngine examples "examples/UI/MultilineText/MultilineText.data")




MikeHart(Posted 2013) [#16]
Thanks, I will include this sample inside the distribution.


ordigdug(Posted 2013) [#17]
I noticed a few comment mistakes I made...they are fixed in above post.