Hey guys! Does this code make sense to you?

I've been working on a code for about a day or 2 now, its for spawning . I wanted it to spawn on and off when the actor hits a certain points (Example 5 points)

But this is what tried at the end. I coped a new platform and I said (On the new platform)

If game.score = 5

Do: spwan Actor.
That code didn't work for some reason.

But When I said for the move (For that one platform)

If game.score = 5
Do: Move

And it moved that platfrom with no problem.

so idk ? (It should start spawning the actors shouldn't it)

Comments

  • AdrenalineAdrenaline Member Posts: 523

    There are a lot of reasons this could be happening, and we can't really tell unless we see the game project. One thing to check: the position of the spawn. Is it relative to the actor or scene? For the sake of checking this code, select scene and an X, Y position that you KNOW is in view of the camera.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @adrenaline Yeah I was trying to upload an image to help you guys out but what does image url mean? That's all I see when I try to attach an image

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited April 2014

    123

  • AdrenalineAdrenaline Member Posts: 523

    @vnwadike13‌ "Embed an image by uploading it to a file-sharing service and then posting the URL as < img src="URL" >" *

    *Copyright © 2014 @tatiang‌ . All rights reserved.**

    **Copyright © 2014 @Braydon_SFX‌ . All rights reserved.

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    @Adrenaline‌ - I see what you did there...

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @adrenaline okay I just uploaded it to my google + plus account https://plus.google.com/u/0/117625872037189146368/posts

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited April 2014

    That's the code for my spawner. Would you need to see something else?

  • AdrenalineAdrenaline Member Posts: 523

    You didn't embed the image correctly, it should be showing up right here in the forums. Also, I clicked that link and I don't see the image you're trying to show either

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Adrenaline I appreciate the copyright :) but it's now possible to just drag an image right into the message body of a post.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • AdrenalineAdrenaline Member Posts: 523

    Even easier then!

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @adrenaline could you see the image from my google plus?

  • AdrenalineAdrenaline Member Posts: 523

    no, but like @tatiang‌ said, you can just drag and drop the image into your post and it should work

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited April 2014

    image

  • AdrenalineAdrenaline Member Posts: 523

    Where is the actor that is doing the spawning? I originally suggested spawning the new actor relative to scene so you know that it will be viewable by the camera. There isn't much more I can tell from just that screenshot.

    By the way, you still didn't post the picture correctly but I navigated to your photos on the g+ account and found it

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @tatiang that drag on thing doesnt work. When I drag something from my computer it like redirects me to an image that is bigger . I don't if its my computer or I don't know what i'm doing lol it seems pretty self explanatory

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Hmm, sorry you're having trouble with it. A few things to try:

    (1) Make sure you are dragging the image file from the Desktop and NOT from a browser window (e.g. Google Drive).
    (2) Use the attachment icon in the toolbar just above the message body window.
    (3) As @Adrenaline said, upload it to something like Dropbox or TinyPic and post the share link here with embed tags.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @adrenaline Idk my computer was acting up It wouldn't let me drag it on for some reason. So i tried to embed and I failed at that too lol. But I put it just outt side of the scene so when the game.score =5 it moves. I can take a screen shot of where I put it if that'll help. (Also the first platform moves perfect it just doesnt spawn the others.) That's what i'm trying to find out if i'm coding it wrong.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    OOOOHHI feel stupid Face Palm i'll try to post the images now from what you said @tatiang

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited April 2014

    Image and video hosting by TinyPic

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @tatiang & @Adrenaline would this help in anyway?

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    You forgot the h in your link, tinypic.com/view.php?pic=ddpet1&s=8#.UzxmaahdXro

    Am I correct in saying your spawner is on the platform itself? you would need to have one on the scene for this to work, also your in 'instance' not 'prototype' sorry If I have misunderstood

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • AdrenalineAdrenaline Member Posts: 523

    I'm having a little bit of a hard time following your work flow, but think about this: if you have the spawner outside of the scene and you're telling it to spawn a new actor right on top of itself, that new actor will be outside of the scene as well so you won't be able to see it.

    Instead, set the spawn point "relative to scene" NOT "relative to actor" and pick an X, Y location that is definitely inside the scene.

    One more thing to think about: if you move an actor to a position that is not inside the scene's boundaries, it gets destroyed. Correct me if I'm wrong @tatiang‌ , but if you move an actor too far off-screen, it's gone. That could also be your problem.

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    @Adrenaline said:

    Correct me if I'm wrong tatiang‌ , but if you move an actor too far off-screen, it's gone.

    Is this true? I'd like to know

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • AdrenalineAdrenaline Member Posts: 523

    @SmokeyAce73‌ I've observed it to be true in my games. There were times when I wanted to move something out of view but stay there for future use, so I'd move it to something like x = -1000 (way out of the scene). Then, if I told it to come back (or do ANYTHING), it wouldn't. Instead, I would change that location to somewhere still in the scene and just set it's alpha to 0. When I did that, it still existed and worked as I wanted.

  • SmokeyAce73SmokeyAce73 EarthMember Posts: 370

    @adrenaline Oh nice thanks for the tip!

    Developer For BLUNTentertainment - Feel Free To Message Me! - Free Beginner Templates!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @SmokeyAce73

    @Adrenaline said:
    Correct me if I'm wrong tatiang‌ , but if you move an actor too far off-screen, it's gone. That could also be your problem.

    This is true. I don't know the exact distance but it's easy enough to test (place a log debugging statement inside of an every 1 second timer and make an actor move toward the edge of the scene; watch the Debugger window to see when it stops logging). From practice, it seems like a couple hundred pixels of room and then the actors are automatically destroyed.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • AdrenalineAdrenaline Member Posts: 523
    edited April 2014

    That's the same screenshot you've been showing us. Also, it helps to do more than simply paste a link and assume other people are going to figure out what it is, what you want, if it's safe to download, etc.

    Again, all I can say is to try to spawn the new actor relative to scene. In every screenshot you've shown, you're spawning it relative to actor. I can't offer any more help with the information I've been given. Maybe someone else can...

Sign In or Register to comment.