LittleStain's Recent Forum Activity

  • This would allow a deviation of 6 degrees per second, but is one way to do it:

    every 0.1 seconds - bullet set angle of motion = clamp(angle(bullet.x,bullet.y,target.x,target.y), bullet.Bullet.AngleOfMotion-1, bullet.Bullet.AngleOfMotion+1)

  • So you mean that map is loaded live from the openstreetmap.org server in its own layer and you made your interactive data in a seperate layer in construct2 as an overlay?

    Am I getting that right? That looks pretty slick I must admit.

    Dank je wel trouwens

    Yep that's about it..

    The markers on the map itself are part of the plugin, but controllable from within Construct (Appearance/placement)

    They are updated every minute to reflect if the pubs are open or not (using the system time of the device running the "Game")

    Because the map is a DOM-element C2 can't really overlay it (unless you use a div/html-plugin), so I just played with animating the size of the map to uncover the menu's and stuff..

    It took quite some experimenting to get it to work and look right (especially because I wanted it to work on every screensize, mobile, tablet and desktop), but I'm quite happy with the result.

  • I've once made an interactive map with C2 showing in realtime which pubs were open in my hometown..

    I used the Openstreetmap.org maps for it. Dragging etcetera was done through the original leaflet.js.

    I had to adjust a plugin a bit to get it to work, but the effect was pretty nice.

    WatIsOpen

    should work on mobile as well as desktop.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Should be something like this:

    Create a global variable DiceRoll

    Add the function object to your game

    triggered event (on sprite clicked?)

    • system set variable DiceRoll = int(random(1,111))
    • Function call "DiceAction" with parameter0 DiceRoll

    on function "DiceAction"

    • Function if parameter0 is < 50

    > (add the action you'd like)

    • Function if parameter0 > 49
    • Function if parameter0 < 100

    > (add the action you'd like)

    • Function if parameter0 > 100

    > (add the action you'd like)

  • It would probably be better to create a sprite on left button pushed give it the drag and drop behaviour and pin it to the map so you can drag the map while mouse down.The visual effect would be the same as dragging the viewport over the layout, but ofcourse it could give other issues, depending on the needs of your game.

  • If you could first explain what you expect with a dice roll, it might be easier to tell you how to do it..

    The above comments explain how to get a random number.

    Once you get the random number you can compare it and attach the actions you'd like to set.

    What part are you having trouble with or was your initial question misunderstood?

  • You can just drag them there to make them subevents of the group..

  • I think you are confusing turning on collisions with solid behaviour.

    Collision is only for detection-purposes, without solid behaviour the character will go right through..

    Thanks for the ninjaaaaing

  • I think you mean something like this:

    On object2 created - object1 add to variable value = object2.value

    On object2 destroyed - object1 subtract from variable value = object2.value

    With multiple objects it would probably be easiest to use the family feature and have the adding event be in a function.

    Maybe using the is on screen - condition, would be an option.

  • Not sure if I understand correctly, but there's the action add to variable..

  • I guess using replace would be the expression to use:

    replace(src, find, rep)

    Find all occurrences of find in src and replace them with rep.

    So that would be

    system set Stats = replace(Stats, "money", str(money))

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies