BenGIJOE's Recent Forum Activity

  • Looks good and seems to work well! I wasn't entirely sure what I was doing but I seemed to be winning! =D

    Only thing I noticed that might need a fix is that you can still activate the spin reel button when the machine is already spinning or stopping. Additional clicks on the spin button doesn't prevent the columns from stopping but it charges you and will change the values(images) of any columns already stopped.

    However, I am not familiar with slot machines and that may have been how you intended for it to work...

  • ErekT is right you can easily do this kind of logic with events.

    However, In this case you should be able to create these actions without the every tick event by adding a condition or sub-event that compares the players maxspeed to another value (in you example 100 & 300).

    And just to clarify on accessing an objects properties,

    I not sure how the gamemaker language compares but in C2 to change an objects properties you sometimes have to dig into it a bit. For example speed is part of a behavior, in this case 8direction movement, so you have to access the behavior too. To get/alter the object's speed property you would need...

    objectname.8Direction.MaxSpeed

    then you can add / subtract from it using the set maxspeed action

    action: set object's maxspeed to objectname.8Direction.MaxSpeed + 100

  • Is the goblin animation pinned to the goblin object (or any other method of making them move together)?

  • This probably isn't the most efficient way but you could test whether the integer of the number divided by 2 and than multiplied by 2 is equal to the number...

    if   int(n/2)*2 = n

    else....

  • Yttermayn

    Don't forget about the manual and tutorials :)

    Manual..

    scirra.com/manual/99/pin

    Tutorial..

    scirra.com/tutorials/243/building-a-platform-game-a-beginners-guide/page-2

  • One way is to create variables to store the x,y values on touch start and on touch end and calculate an angle from those.

    How you turn that into movement may depend on the behavior you have set for your player.

  • Whiteclaws suggestions should work...

    They both did when I tried them.

    However, I was able to create a scenario where the debug text was stuck at one number (zero). It was because I had a bullet object outside the layout and I removed the destroy object outside layer behavior. So the text was following that bullet instead of the ones I fired.

    Not sure if you may be having a similar issue?

  • When you're bullet collides with the enemy (I am assuming you are using this event) you will have to create an action to destroy the enemy or subtract from its health (depending on which effect you want). If you want the latter you'll need another event saying to destroy the monster when its hp variable = 0.

    You may need to follow danuyos' advice if you want more specific information.

  • Just to expand on what Whiteclaws is saying...

    I still have the free version of C2 at the moment so I haven't used families yet and can't verify what I'm about to claim...

    but I think you can use a family instance variable for health and just set the value of the variable for each object (enemy) in the family.

  • Adding the following condition to the Left Mouse click event should fix the multiple selection issue.

    Heroes -> Pick Top Instance

    (Under Z Order - pick top/bottom)

  • I got the two jump animations to play by changing your jump event to..

    PlayerBox - on jump

          > blueMan - Is animation "idle" playing - set....

          > else

            blueMan - X (inverted) Is animation "idle" playing - set...

    To test that it was working I added a piece of text that updated every tick with the animation name the blue man was doing.

    I had to increase the animation speed to notice much of a difference in the animations though.

    Hope that helps :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are right. =)

    You can get the distance between the two with distance(Player.X,Player.Y,Sun.X,Sun.Y)

    If you want to make it more realistic and make the effect of distance stronger you can square that value.

    You could also give the planet/star a mass variable and use that instead of directly specifying a force. Might make things easier if you have many planets/star and use families later.

    http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation

    EDIT: Looks like spongehammer beat me to it! =D

BenGIJOE's avatar

BenGIJOE

Member since 2 Feb, 2013

None one is following BenGIJOE yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies