Aphrodite's Forum Posts

  • The problem is your "set local key"

    you just have to enter the name of the key, here "highscore" (with the " " ), not the WebStorage.LocalValue("highscore")

  • If you don't mind, yes, I could give it a try ^^

  • I See, The Webstorage keys are strings!

    WebStorage.LocalValue("highscore"), don't forget the " "

  • Did you check that WebStorage Works on the tested device? (and did it works in the computer?)

    EDIT: I ask that because, as far as I see, It should work

  • Hello guys!

    If Orientation > 4

    Change X of Sprite to Sprite.X + 2

    Ok... if i keep the phone flipped the Sprite will always go foward 2 pixels.

    But if what i want is :

    Every time the orientation changes, it moves the sprite.

    So... if i turn the phone a bit and let it flipped at that angle, the sprite will, in the first time, go 2 pixels, but then it will stay in that position.

    Logic's problem. Can anyone help? Thank you :)

    The System Condition "Trigger once while true" should make it work, you have to add it as the last condition

    Basically, Trigger Once While True becomes true when the other conditions passed from "False" to "True", and a tick after that, become False, so It should help you

  • Your theory is good but only good for a bullet traveling on a fixed path.

    In my case I need to know which way (left or right). a bullet of fire like mario bros type when you get a flower.

    when the path changes, the formula is still valid I guess, and the VectorX I wrote is a negative number when going to the left, a positive when going to the right , and 0 if not travelling on the X axis(since the cosinus can be negative or positive or equal to 0 with the angle)

    but still, this is a tricky formula, and I'm pretty sure a more understandable method can be found

  • blackhornet this is what i need but How did you set wariables to " "

    Anyway i edit yours capx and when i substract from sprites, text dont show substracted number

    https://dl.dropboxusercontent.com/u/44710358/test.capx

    That is a little problem: The text is showing the value of total

    but total isn't re-calculated when a budynek is clicked, replace the "on start of layout" by an "every tick", and it will be fine (because it will be reset to 0, recalculated, and finally the display changes, before, there were no recalculating)

    EDIT: you can also only recalculate when the fish is clicked, but in this case, you must assure than the value at start of layout will be good too

  • Hmm do you mean I should make the event Set Angle?If so what angle should I use?Oh and im kind of new so i might misunderstand some stuff :/

    don't worry, everybody is a new first ^^

    first: how did you make the creature move?

    If you used a behaviour like "8 directions", then when you click the creature, in the properties window (on the left by default) should look like this:

    <img src="https://dl.dropboxusercontent.com/u/10035971/images/Behavioursetangle.jpg" border="0" />

    it could be another behavior, but even in that case, this "Set Angle" should be set to "No".

    and if you didn't use a behavior, how did you do to control him

  • I was unable to find it :/, I think you want to know the Sped on the X axis, with the minus if it goes to the left, we can recreate the expression should be okay too:

    Sprite.Bullet.Speed and Sprite.Bullet.AngleOfMotion will help us

    your VectorX is equal to:

    (Sprite.Bullet.Speed * cos(Sprite.Bullet.AngleOfMotion))

    and also VectorY is equal to:

    (Sprite.Bullet.Speed * sin(Sprite.Bullet.AngleOfMotion))

    Sprite is the name of your sprite

    Tell me if I am wrong

  • Aphrodite almost right but i have this same sprite x4 no 'sprite1' 'sprite2' just one sprite copied four times

    Sprite(0) is the first instance 0 based of Sprite, the () are used to select a particular instance, as you can verify, "(" and ")" can't be used as a Object name, because of this

    Sprite(0) is the object Sprite, but only the instance 0

  • Hello, I know my account is kinda old, but I never introduced myself and use this forum before (Why? I don't know)

    I'm a french guy (yes, guy, I know "Aphrodite", the female character, but still a guy)

    When I was a kid, I had already a pretty good collections of video games (Master system and NES, later, I owned a Game Boy Color), but weirdly enough, I know games, but don't enjoy them as I could, but I like how they are made, After many tries to learn a language (and fails because of some problems of mine), I turned into some alternatives, they had their advantages, but nothing I really was "into".

    Later, while playing a certain game, Kyat told me about Construct 2,

    and I really liked it, That is simple: I LOVE Construct 2, and after a lot of time, I finally come here, I hope I can help people, and make them happy.

  • If I understand well, you could set an instance Variable hp, set by default to 25 for each one, and a global variable, GlobalHp, then, you set global HP to Sprite(0).hp + Sprite(1).hp + Sprite(2).hp + Sprite(3).hp, it should work, I didn't test it though

  • you should set the animation to set when :

    Key Pressed: Down (instead of Key is down)

    To set the collision mask, you use the Sprite editor included in Construct 2, but I think the problem is the origin of your Sprite, for a platforming game, it's better to set it at the feet of the player, so if his/her tall increase or decrease, it will evolve upper instead of all around of the player

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right now, the event which define how the cat avoid obstacles should contain how to avoid them I guess, you should have now something like:

    Condition_to_avoid | Actions_to_avoid

    the idea is simple, we will create a variable, and do this:

    Condition_to_avoid | Set Variable to random(100)

    If Variable<X | Avoid

    Else | Dont_avoid

    X is the percentage chance of the cat to avoid the obstacle

    If you need more information, or don't understand, don't be affraid to ask.

  • You can set a sprite with the "ScrollTo" behaviour, then place it on the part of the layout where you want the screen to be. I don't see a easier way.