Wronghands's Recent Forum Activity

  • Hi everyone,

    First of all, here is a stripped down .capx with the single relevant event.

    <img src="http://dl.dropbox.com/u/3138530/a.png" border="0">

    I have a sprite named "Enemy" that has an instance variable named "AttackInterval" Every time the amount of time set in AttackInterval is passed, the value is recalculated with choose or random and a bullet is launched from the sprite.

    I would like this recalculation to occur for every instance of the "Enemy" sprite seperately so that the bullets are launched in seperately calculated intervals.

    When I say:

    Every Enemy.AttackInterval seconds -> Enemy Set AttackInterval to choose (2,4)

    It does indeed recalculate the variable values in each instance seperately.

    But then it only takes the number of the first picked instance into account and the other instances obey to the picked instance, all firing the bullets together.

    I'm almost certain this behaviour is intended for other practical uses but the proper C2 syntax to get this thing occur the way I want it is unclear to me. "Every Self.AttackInterval seconds" can not work as "Self" can not be assigned to system objects and my attempts with "pick all" and "for each" combinations have all failed.

    The .capx I linked above demonstrates how each instance can be resized according to their own variable but the rest is lost to me. It's probably a simple matter but assure you, I have spent several days solving other seemingly complex problems with my project and am now legitimately stuck. :p

    Thanks all for reading.

  • Although this is a workaround with other minor consequences and not a compensation for something that should not have happened in the first place, thanks.

  • Hi again,

    I work with a laptop, usually as a dual monitor setup by connecting it to another monitor but every time I disconnect the monitor to use the laptop on the couch I find construct 2 almost impossible to use because the panels like instance variables, animation strip etc tend to open where they were previously been and sometimes this location is in the boundaries of the other monitor that no longer exists therefore I cannot see/reach/move/interact with them without that extra monitor. Please fix this somehow :/

  • Thanks for the clarification Ashley.

  • needs a bump

  • Ashley

    It's an interesting idea, but I always thought it was best solved by simply designing for the biggest (iPad retina) and using the 'fullscreen scale' option to it scales down for all the smaller displays.

    Are you talking about 2048 * 1536? Will it not be a performance hit for weaker devices apart from the memory allocation? What if we also need to export it for chrome or facebook?

  • edit: nevermind, I'm convinced it's just the behaviour that can't perform at reasonable speed for my task.

  • Kyatric

    At last I were able to implement your solution to a working example but am now having massive performance hits. :/ There are probably simply too many paths to calculate as disabling the despawn events did not help the performance. Even my i7 desktop is slowing down.

    Instructions (sorry about the unintiutive state of things):

    SPACE = End Turn / switch active side

    Right click on active side units = pick the unit

    Left click while an unit is picked = move the unit

    I'm not comfortable with uploading a full capx anymore but can do so privately if you'd like. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Kyatric

    Yes, more people will benefit from your solution If someone with required forum priveleges can/want to split the relevant posts to a new thread there; sorry about the extra work for whomever wants to do so. Just wasn't sure if I could post about a third party behaviour there.

    As for your solution itself, I'll be examining it with a clear mind soon. I can say it's neatly and intelligently done just from the looks now. Thank you for everything you've been doing for us noobs. :)

  • Kyatric

    Shameless bump ;)

  • Hello again Kyatric

    It has been a while and I did progress somehow on my own, thanks to your and Yann's directions of course. Now I'm trying to spawn preview sprites that indicate all the possible movement locations for the starting sprite, limited by obstacles and range. I have a crude working example of that but I'm still having several problems:

    I'd like to detect collision between sprites that spawn on top of each other and kill the excess ones or even better, not spawn preview sprites at all if one already exists on target location but I've been unsuccessful to have such collision recognized by the events system. I still have an idea to add "occupied" x and y locations to an array and blacklist them from spawning but I couldn't get it working either. It has been several hours and despite the apparent simplicity of the matter it seems futile to keep trying all by myself.

    Another problem is that the preview sprites are sometimes placed over obstacles. A workaround would be to keep them on different layers or z-ordering but this doesn't seem to be an intended behaviour.

    The project itself has gotten a bit complicated therefore I removed the unnecessary parts and created this .capx with the bare minimums to explain the problem.

    PS: I'm also open to criticisms regarding use of arrays. Thanks! :)

  • you should add a Text box on your layout where the player will enter his name, and on click on the validation button, you will send an Ajax request that will look like :

    -> Ajax: Request "http://yourURL/post.php?name="&Textbox.text&"&score="&score (tag "sendScore")

    Yann

    Reading between the lines I got the idea that Textbox.text here can be anything in practice like an instance variable (Unit.Health) or maybe Sprite.UID

    Am I right here? How should one mention a global variable there? Just using its name? Thanks!

Wronghands's avatar

Wronghands

Member since 16 Dec, 2011

None one is following Wronghands yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies