Spawning without a spawner

Village IdiotVillage Idiot Member, PRO Posts: 486
edited April 2016 in Working with GS (Mac)

Hi.. I've been working on trying to make a spider randomly descend along a thread for my sideways scrolling game. I've received a considerable amount of help from a resident Yoda – but unfortunately I have again depleted the force within the wise one, mainly due, I think to my remedial brain frustrating the bejesus out of him.

I've successfully made my spider do the above using interpolate – thanks to the Yoda, but unfortunately I'm left unable to spawn the thread and spider actor randomly. The Yoda told me (just before the force vanished) that a spawner was not necessary. This is where I'm completely lost (again). Does anyone have any idea what direction I should go here?

I've got a link to the discussion I began – which helped a huge amount. Alas, unable to spawn..

http://forums.gamesalad.com/discussion/91504/drawing-a-line-from-an-actor#latest

PS: I wish upon a star that my tiny brain could enbiggen..

Comments

  • GnarlyGnarly canadaMember Posts: 840
    edited April 2016

    You want the spider in random positions in the scene? Random lengths of web? Random timing in the game?

    What random are you talking about?

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    @gattoman
    I want the thread with spider to descend to random y positions and x positions, with random timing. The Yoda has messaged me since I posted this to let me know the he wasn't necessarily saying that you can spawn without a spawner, but that he was wanting me to clarify my description. So, I'm now guessing that I'll be using a spawner after all?

    While I'm here, I was wondering if you – or anyone else out there would know of anything I could view (video or actual words) that would assist someone like me who leans more toward making pretty pictures.

    I'm hoping that Neuroplasticity will somehow happen and that I actually begin to develop a brain that can perform these magical feats of mathematical understanding. The way that this Yoda seems to just naturally be able to insert things into the expression editor and intuit the outcome is for me, mind frying and impressive.

    I'm able to draw things naturally, but this stuff involves the part of my brain that for most of my life has been covered in dust and in a dark and dank place. Illumination anyone?

  • RossmanBrothersGamesRossmanBrothersGames Member Posts: 659
    edited April 2016

    "I want the thread with spider to descend to random y positions and x positions, with random timing."

    Simple enough there is a few ways you can go about it. Here is what I would do as this is the simplest way that comes to mind for me.

    Have a spawning actor with this rule:

    When self.time is > random(smallest amount of time you want, largest amount)
    then,

    Spawn actor web at position relative to scene with the X coordinate being random(smallest value you want, largest)

    Spawn actor spawner

    Destroy this actor

    (The reason I would have it destroy itself and spawn another spawner is to start the timer over and not need to write a bunch of code in one actor to have consecutive random timers. When the spawner is created it will choose a random time and spawn the web at that time, then it will destroy itself and spawn a new spawner. The new spawner will pick new random time and do the process all over)

    In the Web actor have it use a randomly generated number for the why coordinate it will stretch to.

  • Village IdiotVillage Idiot Member, PRO Posts: 486

    Thanks for the advice @RossmanBrothersGames – I'll give it a go.

Sign In or Register to comment.