Spawning

Radi1234Radi1234 Member, PRO Posts: 49

I've successfully spawned an actor. Now my goal is to make my "player actor" to collide with any or all of the spawned actors. But the player is not colliding with the spawned actors. It is passing from behind them.. It is colliding with the original actor though. So do the spawned actors not follow the same properties as the original one? :-/

Comments

  • ArmellineArmelline Member, PRO Posts: 5,364

    Did you "unlock" the main actor on the scene and make changes to the logic in that unlocked actor?

    There are two types of actors: Prototype and unlocked. The ones in the list on the left are the prototypes, and if you drag them onto the scene, all changes you make to the original prototype will be reflected in all the others.

    If you unlock an actor by double clicking on it on your scene, then clicking on the padlock, it will behave differently. It becomes it's own individual instance, and if you make changes to it they'll only apply to that one copy. Similarly, if you make changes to the prototype, they'll not apply to it.

    What it sounds like is happening is this:

    You created your actor, let's call it "Enemy". You placed it on the scene of your game, and double clicked on it, and then unlocked it by clicking on the lock.

    You then added logic to spawn other copies of itself, and added rules to collide with the player.

    The result would be the player would collide with the first Enemy, but not with any others (as they don't share logic with the original).

    It's an extremely common mistake to make, so I'd recommend checking it first.

  • Radi1234Radi1234 Member, PRO Posts: 49

    @Armelline‌ Thank you so much for the reply! You were right! Now everything is working perfectly but the spawned actors stop falling from the top of the screen after 30-40 seconds.
    Heres what I did
    Created a timer
    Inside it added a spawn actor behaviour with the specifications I wanted

    Created and accelerate to behaviour inside the actor I wanted to spawn.

    The game works perfectly for 30 seconds. No problem with NOTHING. Do you think it's a bug in game salad?

  • ArmellineArmelline Member, PRO Posts: 5,364

    I would be extremely surprised if it was a bug in GameSalad. What are the specifications in your spawn actor? That's most likely where the problem lies.

    I'd strongly suggest getting out of the mind-set of assuming that problems are GS's fault. GS has it's fair share of bugs so it's entirely possible, but it's always MUCH more likely that an error is caused by a fault in your logic and each time you identify and find such a fault you learn something new.

    I just completed a big project and more than once I had a bug, spent ages pinning it down, concluded it must be a bug in GS and 3/4 times it was entirely my fault. And that's not to mention all the many other bugs that were clearly my fault :D All fixed now though, with luck!

  • Radi1234Radi1234 Member, PRO Posts: 49

    for every 1 second- timer
    {
    spawn actor( actor name, position- random(-300,300), (568)..
    Layer- Back of layer..
    Relative to scene}

    And sorry for creating another thread. Ill delete it. I was kinda desperate -_-

  • ArmellineArmelline Member, PRO Posts: 5,364

    That is everything inside the actor? Could you post a screen shot of the rules?

    (Print screen on PC, cmd+shift+2 on Mac)

  • Radi1234Radi1234 Member, PRO Posts: 49

    How do I post the image here? I can't find upload button anywhere!!!

  • Radi1234Radi1234 Member, PRO Posts: 49

    image

  • ArmellineArmelline Member, PRO Posts: 5,364

    Image link is broken :(

    You can't upload as a non-Pro user, so you'd need to use imgur.com or another image hosting service.

  • Radi1234Radi1234 Member, PRO Posts: 49

    Oh! Okay. Im gonna get back to you pretty quick. Bear with me! -_-

  • Radi1234Radi1234 Member, PRO Posts: 49
    edited August 2014

    image

  • Radi1234Radi1234 Member, PRO Posts: 49
    edited August 2014

    image
    This is the object code which I wanted to spawn. The previous was the spawner code. @Armelline‌

  • Radi1234Radi1234 Member, PRO Posts: 49

    Hey I solved the problem!! Again it was the enemy problem thingy. The changes I made weren't reflected in the window which opens when we directly double click on the spawner on the screen. Thanks a bunch!!! @Armelline‌ Bye Bye!

  • ArmellineArmelline Member, PRO Posts: 5,364

    Glad you got it fixed! Keep an eye on those actors, they can be pesky little fellas :D

  • Radi1234Radi1234 Member, PRO Posts: 49

    @Armelline‌ True! I just purchased the pro version. How do I start using it? :-/ Does it get activated on its own?

  • ArmellineArmelline Member, PRO Posts: 5,364

    @Radi1234 said:
    Armelline‌ True! I just purchased the pro version. How do I start using it? :-/ Does it get activated on its own?

    You need to sign in within the creator and then the Pro features will be available to you.

Sign In or Register to comment.