dmurphy's Recent Forum Activity

  • Hey there,

    I am trying to get a specific variable from a specific object in a family.

    Basically I want to get the x and y values from an item that is equiped in the family.

    This is what I have so far:

    But I can't see how I can access the specific variable of the object that meets the conditions.

    Can anyone help me out here? Thanks!

  • Hey there,

    Maybe someone can help me with this. It has been wracking my brain for the last few hours.

    I am trying to figure out the best way of creating a weapon shop for my game.

    Basically what I was thinking of doing was setting temp variables each time a weapon is viewed on the store. Then when they buy the weapon and equip it those temp variables become the permanent variables for stats.

    This would be a pain though as I would have to set the variables for each and every weapon I plan to have. And I plan to have a lot. Instead I would like to just pull the instanced variables from the object they just clicked on and set them as the permanent variables.

    I could copy and paste into each weapon event the commands to set the temp variables but I would still need to go in to them all and set wep1.str to wep2.str and so on. Making it a long and arduous process.

    You can see here how I have laid out the events for the shop for two weapons using the method I have mentioned above using temporary variables.

    I would then use these saved variables on the buy button event to set the permanent variables if bought and equipped.

    It would be great if I could grab the item being called in the event initializer for e.g on touch basic_bow and use it in the actions associated with it such as this.something when an object is called in the action itself.

  • Whelp. I blame that on the late hour

    Thanks blackhornet!

  • Hey there,

    Maybe I am a little tired but should this work?

    Basically I want the text of the button to change depending on whether or not they own the weapon but it is doing nothing.

    Obviously I am wrong. Can someone help me out here? Is that not how you do an if statement inside an event?

  • Hello,

    I am trying to figure out the best way to do this.

    In my game you have one monster to attack at a time. What I would like is for this monster to become active.

    When active the game will access it's instanced variables and do stuff such as take it's variable attackPower from the players health.

    Right now this is how I am diferentiating between what mob should become active but there has to be a better way than this. Such as at the 1 second tick I would rather just have one action that is like every 1 second take active.attackPower from playerHealth.

    If there was a way to set an active monster it would be so much easier to do a lot of things such as set the enemy health bar in just one event instead of all of them.

    In another language I could make a function and just assign a variable to a parameter to it to do all the work.

    Any ideas?

  • I just looked at a view videos of this program and I have to just say.... wow. I bought it almost instantly. How the hell are you guys not charging more than 25 dollars!

  • there's a number of ways to do it. but here's one off the top of my head..

    you could give the text bullet behavior and fade behavior, then make a Mouse Event-> on object clicked (your text object) enable bullet (you have to also set angle of motion to whatever direction you want the text to go..(0-360 degrees)and click 'Set Angle' to Off in the properties panel). and also enable Start Fade. and in the Properties Panel of the fade just set fade out to 1.. (and destroy after fade for a nice clean up).

    Thank you. Following your advice I got it working.

    For anyone who needs to know how it is done in the future this is my events:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there,

    I am making my first game which is a cookie clicker clone. I was using game maker studio up until tonight but think construct 2 may be a better choice for me going forward.

    However I can't seem to figure this out.

    What I am trying to do is when you click on the cookie object text will float from the mouse x,y position upwards for a second and disappear.

    In GMS I could do this via the GML language but I do not know where to start as I see no way of adding scripted events to a Construct game though I am sure there is a way.

    Hopefully someone can point me in the right direction.

    EDIT

    Just to give you guys an idea of what I mean. in GMS I could create an object and add a scripted event such as:

    speed = 1; // set the speed of the objects movement

    direction =90; // set the direction of the object. In this case 90 degrees (up)

    create_text(mouse.x,mouse.y,"text here"); // create text here at mouse x and y

    speed *= .9; // slows the text down every tick until it stops

    Then after x ticks destroy the object.

    I would then create this object on the right click event on the cookie object. thus creating the text at the mouse location.

    I could do this in javascript as well pretty easily however I do not know how to "inject" javascript into the game. It all seems very drag and drop only with construct. Hopefully I am wrong though!

dmurphy's avatar

dmurphy

Member since 23 May, 2014

None one is following dmurphy yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies