ignition X questions

Monkey Archive Forums/Monkey Projects/ignition X questions

Ashmoor(Posted 2016) [#1]
Hi guys, I have been checking the examples but I have not been able to learn how to do some things and before proceeding to code these myself, being the newb I am, I want to ask if they are already coded and can be done with ease:

- can you set a different "pivot point" for sprites instead of using the mid ?

- is there a function to determine the angle of a vector using two points?

- is there a field for a layer or scene background image? (didnt find any) is it ok if I use a large jpg iLayerSprite instead?

- can I link a sprite to another (parent) sprite and have it keep relative position while the parent rotates or moves?

More will come.

I'm trying to make a bubble shooter so I would like the cannon to "look at" the mouse pointer.

Thanks.

edit: did I not post this in the beginners section? please move the topic where it belongs.


Playniax(Posted 2016) [#2]
can you set a different "pivot point" for sprites instead of using the mid ?

With Ignition X this is only possible with gui objects. Pyro can handle sprites and gui objects!

is there a function to determine the angle of a vector using two points?

Yes, it is ATan2, you can find it in the Monkey docs

is there a field for a layer or scene background image?

Yes, you can create a custom Layer by extending iLayer and use the OnRender method.
Class MyLayer Extends iLayer

    Method OnRender:int()
        'Draw something...
        Return 0
    End

End


can I link a sprite to another (parent) sprite and have it keep relative position while the parent rotates or moves? maybe ILayerGroup could work but I'm not sure yet, didnt get to that point yet

Yes, you can use groups for this.