Atlas_Grey's Recent Forum Activity

  • > I think the problem is that you are picking a random spawner first, and then checking if it has not spawned a key. If the first condition picked the spawner which has already spawned a key, the whole event won't run. You need to swap the order of these conditions in every event.

    Worked perfectly, thanks for your help.

  • I think the problem is that you are picking a random spawner first, and then checking if it has not spawned a key. If the first condition picked the spawner which has already spawned a key, the whole event won't run. You need to swap the order of these conditions in every event.

    Also, "Wait for previous action" should not be used like that - you need to remove them or replace with "Wait 0" if you want to wait to the end of the tick.

    Thanks very much for your response, I'll test it in the morning. Always happy to learn more about using construct! The wait for previous actions were something I was trying to see if it made a difference, thanks for clearing that up too.

  • ** sorry ignore that 'spawn score' in the first 'on start of layout event, I forgot I added that when I was testing other solutions. **

  • Hi. I have a level setup that spawns items like keys and coins, but for some reason it doesn't always spawn the coins when the action (or function) is called. Custom actions work for spawning the keys everytime but not the coins... is it because there are too many of them (450+) so it fails to execute?

    When I spawn the coins using "on start of layout" they spawn every time without fail, but I would like to have confidence that I can rely on actions and functions to work correctly so I want to know if I'm doing something wrong. Thanks.

    * scene_controller action 'Spawn Score'

    ----+ System: Pick all Score_Spawner

    -----> Score_Spawner: Spawn obj_coin on layer "a_objects" (image point 0, create hierarchy: False)

    Edit: It seems to happen because I start the 'Spawn Score' action at the end of another action (in a chain of actions). Calling the custom action from 'on start of layout' seems to work fine too.

    Here's the full group for reference -

    [Item Spawning]

    ----* scene_controller action 'Spawn Gold Key'

    --------+ System: Pick a random Object_Spawner instance

    --------+ Object_Spawner: [X] Is Key_Spawned

    ---------> Object_Spawner: Spawn Key_Gold on layer "a_objects" (image point 0, create hierarchy: False)

    ---------> Object_Spawner: Set Key_Spawned to True

    ---------> System: Wait for previous actions to complete

    ---------> scene_controller: Spawn Silver Key

    ----* scene_controller action 'Spawn Silver Key'

    --------+ System: Pick a random Object_Spawner instance

    --------+ Object_Spawner: [X] Is Key_Spawned

    ---------> Object_Spawner: Spawn Key_Silver on layer "a_objects" (image point 0, create hierarchy: False)

    ---------> Object_Spawner: Set Key_Spawned to True

    ---------> System: Wait for previous actions to complete

    ---------> scene_controller: Spawn Bronze Key

    ----* scene_controller action 'Spawn Bronze Key'

    --------+ System: Pick a random Object_Spawner instance

    --------+ Object_Spawner: [X] Is Key_Spawned

    ---------> Object_Spawner: Spawn Key_Bronze on layer "a_objects" (image point 0, create hierarchy: False)

    ---------> Object_Spawner: Set Key_Spawned to True

    ---------> System: Wait for previous actions to complete

    ---------> scene_controller: Spawn Coins

    ----* scene_controller action 'Spawn Coins'

    --------+ System: Pick all Object_Spawner

    --------+ Object_Spawner: [X] Is Key_Spawned

    ---------> Object_Spawner: Spawn obj_coin on layer "a_objects" (image point 0, create hierarchy: False)

    ---------> System: Wait for previous actions to complete

    ---------> scene_controller: Spawn Score

    ----* scene_controller action 'Spawn Score'

    --------+ System: Pick all Score_Spawner

    ---------> Score_Spawner: Spawn obj_coin on layer "a_objects" (image point 0, create hierarchy: False)

  • When there is a collision objects that touch automatically pick up and it is convenient.

    You can add a sub-event listing all objects and in it another sub-event with a variable comparison.

    Like this

    + COLLISION.

    ----+ System: For each Sprite

    --------+ Sprite: Variable1 = 0

    Thanks for the reply! I still couldn't quite get it to work like that, however I took what you said and separated it with custom actions and it seemed to work perfectly. Thanks!

    + Sprite: On collision with Sprite2

    -> Sprite: Record_door

    * Sprite action 'Record_door'

    ----+ Sprite: Is overlapping Sprite2

    -----> Sprite: Set Direction to Sprite2.Direction

    -----> Sprite: Set Room_X to Sprite2.Room_X

    -----> Sprite: Set Room_Y to Sprite2.Room_Y

    -----> System: Wait for previous actions to complete

    -----> Sprite: Teleport

    * Sprite action 'Teleport'

    ----+ Sprite: Direction = "East"

    --------+ System: For each Sprite2

    ------------+ System: Pick Sprite2 where Sprite2.Room_X = Sprite.Room_X+1

    ------------+ System: Pick Sprite2 where Sprite2.Room_Y = Sprite.Room_Y

    ----------------+ System: Pick Sprite2 where Sprite2.Direction = "West"

    -----------------> Sprite: Set position to (Sprite2.ImagePointX("East"), Sprite2.Y)

  • Is there any way to make actions trigger on objects of the same type other than the one that is in the initial condition?

    I want to collide the player sprite with an object, then pick a different object of the same type (with a different instance variable) to move the player to. However when I create the action it uses the original object from the collision instead of a picked object with the different instance variable. I can't seem to find a way to disassociate the initial event object from the one in the sub event. Any tips?

  • fredriksthlm

    So are you saying when I preview in the browser it’s just running a filler advert in place of an Adsense one and it’s safe to test? (I only created admob ad units)

    With the Banner Ad I tried to create it only once per game launch however when I hid the ad I couldn’t get it to reshow again. Perhaps I did something wrong the first time, I’ll take another look at my events. 👍

    Thanks

  • lionz thanks for confirming. I was a bit overwhelmed by Admobs policies and want to be sure I wasn’t creating invalid activity or spam on their end by mistake.

    My ads are working properly in an android Cordova export however when I tried running remote preview to quickly test gameplay changes to my surprise the reward ad actually triggered (Banners did not though). I didn’t think it would happen and feel a bit hesitant to preview my game now.

    Thanks for your help!

  • Hello!

    I'm in the process of adding Mobile Adverts to my finished game. I've set up my Admob account and can successfully trigger adverts when I want them to appear(in test mode on android), but I'm unsure if I'm executing it correctly.

    Generally I am creating an advert at the start of a layout to prepare it for viewing. For example, I have a Banner Ad Unit that I want to appear on player death - so I create it at the start of the layout and show it on the death event. It is then hidden when the player returns to the menu layout, clicks play and the cycle repeats.

    Is it safe to create an advert every time the layout is run so that it appears when it should? I don't want to break Admob's TOS by accident and the documentation I have read on displaying ads hasn't been very clear on the correct way to use the mobile advert conditions and actions.

    Thanks!

    EDIT: Also, I noticed reward ads would play in Remote Previews on non-test devices, which bothers me... are these ads actually contacting admob or is this just construct 3 running it's own ads for testing purposes? (I have my MobileAdvert plugin set to test.)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I also tested it on the ipad with the same results.

    for reference, here's how it should appear-

  • Hello 👋

    I’ve been playing with the 3D fog effect and I’ve run into an issue when I remote play on my iPhone 11. Instead of the fog rendering gradually it displays as thick lines of shadow (as seen in the screenshot). It did this in both safari and chrome. I tried it on an oppo A15 and it worked fine. Has anyone else tested this on an apple product?

  • You do not have permission to view this post

Atlas_Grey's avatar

Atlas_Grey

Member since 4 May, 2020

None one is following Atlas_Grey yet!

Trophy Case

  • 4-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies