Question in regards to Second Balloon Video

I was curious. In the second balloon video posted a day ago on the blog, he introduces event touches to make the balloons move up in relation to where you click. I was wondering how you could apply the impulse based off of the location of the click of the balloon. For instance if you clicked from the top of the balloon then the impulse would send it down etc.

In the example given, the x impulse is 0 and the y is -.2
So how would you make those values relative to the actor?

Also, something a bit more complex, how would you create a screen wrap from one side to the next if you didn’t want walls?

Thanks!!

PS. I’ve been looking through the resources, but am having trouble finding good examples of the questions I’m looking for. I’m having jumping in though! Thanks Ansca team.

[import]uid: 10361 topic_id: 3122 reply_id: 303122[/import]

Nobody? Really? Not even one of my two questions? Is it that noobish or just too complex to address here? [import]uid: 10361 topic_id: 3122 reply_id: 9222[/import]

Touch.x-balloon.x
Touch.y-balloon.y
If you get a negative number apply impulse to right or down
If you get a positive number apply impulse to left or up [import]uid: 7911 topic_id: 3122 reply_id: 9223[/import]

Not sure I understand what you’re saying… Could you explain a bit? I’m not sure how to implement that code. Sorry.

Any chance of a staff doing a Tutorial on how to get the screen to wrap? [import]uid: 10361 topic_id: 3122 reply_id: 9257[/import]

@3CordDesign : what do you mean screen to wrap?
[import]uid: 24 topic_id: 3122 reply_id: 9310[/import]

By wrapping i mean If I didn’t want walls but when the balloons went off the left side of the screen They would just appear on the right side smoothly as they went off the left. Would that simply have to be coded into each balloon individually?

Also any tips on that first question?

Thanks for checking in Carlos! [import]uid: 10361 topic_id: 3122 reply_id: 9331[/import]

*cough*

Sorry… I’m getting over a cold :wink: [import]uid: 10361 topic_id: 3122 reply_id: 10334[/import]

Screen wrapping is something I’d like to look into, a la Asteroids. I’m guessing each object that requires wrapping will needing individual coding/coord detection. [import]uid: 7396 topic_id: 3122 reply_id: 10339[/import]

Yeah! It was a simple global setting where i’m coming from. But I expect it’s not that easy. [import]uid: 10361 topic_id: 3122 reply_id: 10386[/import]