SoldjahBoy's Forum Posts

  • Oh wait I think I see.

    I was looking at the NAME of the layers, which I never changed from "Layer 1" and so on. So by moving the layer, it affects everything coded to that layer's actual number, not the title.

    I understand now. I can't check at this time but I'm sure that's what the problem is.

    Thanks for the help everyone. I'll come back if I'm wrong but this surely must be the problem.

    You can use the layer name is the identifier instead of the layer number. You just have to use quotation marks around the name.

    Create player.sprite on Layer 0

    • or-

    Create player.sprite on "MyLayer"

    ~Sol

  • Most browser elements (like text boxes, text labels, lists, etc) will always appear on top of canvas objects.

    This is by design of HTML5, and Construct 2 can't bypass this unfortunately.

    I'm assuming that the Google maps plugin is using the same UI drawing elements.

    ~Sol

  • You need a "heavy" end of the arrow... you could try making the arrow head one object with a little more mass than the rewst of the arrow... attach them together with a hinge/joint... and presto (maybe?).

    You could do it mathematically using QARP to make a nice arc based on some level of "power" from the shot (a bit like scorched earth or similar games where you pick an angle and a power).

    There's probably other/better ways to do this... but I'm a redneck engineer xD

    ~Sol

  • You could do this a lot of ways... the easiest way would be to use physics plugin for your arrows and it will handle this by itself. You would just have to set the parameters for things like gravity etc, until you are satisfied with the behaviour.

    You could also do this using the QARP expression. There are a few examples of using QARP floating around, but you can also read the manual entries about QARP as well. I would link you, but I'm at work and not supposed to be forum posting right now, lol!

    ~Sol

  • You can try using the NWJS feature to "set focus" to the window on startup.

    Start of layout -> NWJS -> set focus

    ~Sol

  • You might find this plugin helpful:

    https://www.scirra.com/forum/cordova-sqlite-database-plugins_t185183

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Locked as per OP request

    ~Sol

  • Weird, my PM box isn't full so I'm not sure why you can't send one :/

    Let me know if you need help understanding the project - it is quite complicated as you said, but I think mainly the part you are looking for is the events that I mentioned in my message

    ~Sol

  • I made a fully functional piece of "Point of Sale" software using C2. A friend of mine opened a fish/aquarium store and had nothing to run his sales... so I used C2 to make something that has fully inventory control, transaction history... and even interfaces with a barcode scanner, receipt printer and cash drawer...

    Yes C2/C3 can do a LOT more than just making games!

    ~Sol

  • Make a sprite, call it "button"

    Add 4 animation frames and set the animation speed to 0 (so it doesn't "play" through the frames) - and set each frame to be one of your button graphics;

    Frame 1 would be the book

    Frame 2 would be the man running

    Frame 3 would be the gear

    Frame 4 would be the window/box thing

    Then you can set the animation frame for the sprite to be whatever you want the button to look like... so if you set to frame 1, the button will be the book, or if you make it frame 3, it will be the gear.

    Then you can choose how it will behave simply by comparing which animation frame is playing.

    On Mouse.click

    --- Button.AniFrame=1(book)

    -----> Open book menu

    On Mouse.click

    --- Button.AniFrame=2(running man)

    -----> Open running menu

    etc etc

    I would make an example for you but I'm at work right now. Hopefully I explained it better this time.

    ~Sol

  • You can use animations or simply use different animation frames from a single animation.

    You can base the function of the sprite based on the animation or animation frame that's being used.

    psuedocode:

    create object -> set animation frame to random(4)

    object.animationframe = 1

    ---- do something

    object.animationframe = 2

    ---- do something else

    etc

    ~Sol

  • How are you setting Spawn.X and Spawn.Y?

    You can add a condition after or before the object is created that says something like;

    Set Spawn.X to random(value)

    Set Spawn.Y to random(value)

    This should change the Spawn variables and make the spawn position change each time.

    ~Sol

  • You can use a loop (system command) "For each [object]"

    For each Object

    --- Object.value = XYZ

    ------------> Do stuff

    ~Sol

  • Hey sorry for the late reply, I've been busy with my new job... I can see what I can put together but it may not be until the weekend.

    ~Sol

  • There are no bugs that I am aware of.

    I also added Line Of Sight behaviour to the "ghost" objects (because my boids objects are following a moving player) - then if LoS is lost, the "ghosts" position are simply set to the player position - then the boids flocking takes over again to create a nice spread pattern for the pathfinding destination.

    If you want to avoid solids accurately, I would also recommend using "custom movement" behaviour on your ghost objects and tell them to push out of solid if they overlap. This will ensure your units will always find a path since the ghost will never trap itself directly inside of a solid.

    I do have a capx file, but it's my current prototype/project and is probably way more complicated for showing this method.

    If you have trouble getting a good result let me know and I will see what I can do. I start a new job on Monday so my free time is greatly impacted - but I can perhaps share my project with you if you keep it to yourself and don't share

    ~Sol