playMaker

Author Topic: How to Spawn at random points (Solved)  (Read 3360 times)

NinjaX

  • Full Member
  • ***
  • Posts: 113
  • XCO is the ULTIMATE IOS Ninja!!
    • XCOGAMES
How to Spawn at random points (Solved)
« on: July 03, 2013, 04:29:22 AM »
Sorry for the simple question, I have been searching everywhere. Say You simply want to make something spawn at random locations ?

Can someone tell in a simple way, Thank you so much. I am very very new lol I have done the tutorials.
« Last Edit: July 05, 2013, 01:41:27 PM by NinjaX »
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to Spawn at random points
« Reply #1 on: July 03, 2013, 05:40:46 AM »
Hi,

 no worries :)

 generate three variables randomly ( x y and z) using the action "Random Float", and then inject it into a vector3 variable or simply use it in "set position" action.

 yes?

also, there is a cool custom action to pick a random point on a unit sphere, use that and then multiply it and it will give a random point too, where aou can actually control very accuratly the distance ( the radius of the sphere, which is the multiplier value here)

http://hutonggames.com/playmakerforum/index.php?topic=925.msg3806#msg3806

bye

 Jean

NinjaX

  • Full Member
  • ***
  • Posts: 113
  • XCO is the ULTIMATE IOS Ninja!!
    • XCOGAMES
Re: How to Spawn at random points
« Reply #2 on: July 03, 2013, 12:15:43 PM »
Thank you so much I think I understand one of the methods and will give it a try now... May I ask something random. Since I have your attention. This keeps happening and its kinda confusing me lol.

Say I have my game set to PC mac in the build settings and under projects settings input I made sure its under key/mouse. Now here is the confusing thing, sometimes when I make a "get button down" under the button name, sometimes I have the whole list. And I can scroll and choose for instance Right arrow, or left arrow... But than sometimes the list is not there.

I dont know what settings I applied to make it there, but its so confusing. If you have time and you know what this is, thank you in advance. Its not super important I guess, so whenever you have time. Super thanx!!
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!

NinjaX

  • Full Member
  • ***
  • Posts: 113
  • XCO is the ULTIMATE IOS Ninja!!
    • XCOGAMES
Re: How to Spawn at random points
« Reply #3 on: July 05, 2013, 01:41:14 PM »
So I have tried this...

"generate three variables randomly ( x y and z) using the action "Random Float", and then inject it into a vector3 variable or simply use it in "set position" action."

And it works thank you so much :D
XCO is the ULTIMATE IOS Ninja, Beware for he sees Everything and Nothing all at once!