99Instances2Go's Forum Posts

  • The expression: TurretObject.Turret.TargetUID

    If you did't rename the turret behaviour.

  • Set score to zero in the 'on touch event' on the starting layout and before you change layout.

  • https://www.scirra.com/manual/83/variables

    Global variables store their values between layouts. Events in any layout can access any global variable, even if it was created in a different event sheet that is not included.

    The meaning of 'global'

    System has an action to reset globals.

  • In fact, in lerp(x,y,z) the z stands for the time that it will lerp from x to y.

    You choosed dt as z-factor, wich is fine, but liniair.

    The thing is, if you change z to a function, also the time is effected. It wil be a bit try and error. (for me it will be).

    So if you change z to 'dt^n' with n a number your choose, you will have a curve. How bigger you choose n to be, how steeper the curve.

    You can google on "graph for x^3" to see the curve drawn. Or x^4 ... any math.

    But now you also changed the time. So you have to correct it somewhat to youre liking.

    That is why i proposed (dt^n)/m, where m is any number that gives you an acceptable time.

    So, you choose n and m and it wil be, with by instance n = 3 and m = 2 ... lerp(x,y,(dt^3)/2)

  • There is no difference in the curving. (i layed one on the other).

    If you mean 'the other way' that would be lerp(item.opacity,0,dt).

    You can have a differend curve using math like: lerp(item.opacity,100,(dt^n)/m)

  • In the layout editor, if you use standard layout, on the right you have a window. In that window you can show Layers, Projects but also Objects. Choose it to display the project. Find your object, drag it to the layout.

    If you want to completely delete 'the last object', then you do that also in that window under the rightclick on that object.

    Also, when you have objects showing, you can rightclick that window to filter the objects, all objects for the whole project, or only objects in the current layout. This might be a help to know wich objects are in a layout.

  • You can set Solid enabled/dissabled in an action.

    So right before you Regenerate obstacle map and Find path, dissable the Solid for the object you want a path for.

    And enable after it after the on found the path.

  • So, you have the animations. And you have choosen a key. I suppose you play the animation when the key is pressed.

    I suppose you have some variable that gets set when the key is pressed, so when a 'block' happens

    Do you check that variable when the thing hits the player before drawing health.

    For how much time is that variable set to block ? One tick ? As long as the animation ? As long as the key pressed ?

    When and how is that variable resetted ?

  • Looking at your capx, i realised what i did wrong. The 'nearest' must be included in the Selected Object List from the previous pick condition. That is also not the case in youre capx.

  • I just had the same problem. I wanted to make members of a family to do a 'push out of solid kind of thing" in a wave outwards. Easyst way to do this is pick the nearest to each one. But that did't work. A bit dissapointed in the capx i just gave someone who asked a question on the forum.

  • Using good old physics.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74SzNzVFZIRjZveWM

    Using custom movement.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74MDB5bFR1MU1uVm8

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Post a capx of you trying the bullet ?

  • It (1258) is moving. With a speed of 100 as set in its Bullet properties.

    Its bullets angle of motion gets changed when its instance variable 'direction' is set to some action in a str.

    Instance variable 'direction' is a random choice when instance variable 'direction2' is some action in a str.

    So far i am with you. Besides that it is a complex system and it is impossible to know if you made a typo in there. Bet lets assume you did't.

    Instance variable 'direction2' gets its value based on the relation between 1258 and sprite43. Sprite43 seems to be the player and has the platform behaviour.

    There are 2 events covering this. But i was stuck allready on the first one.

    That first event starts with a pick by comparing: abs(Sprite1258.X-Sprite43.X) = 0

    Meaning, when they almost are exact on the same place (on the X axes).

    But 1258 moves to the right, as a bullet. Can i move 43 and have it on practical the exact X as the always moving 1258 ? Hmm, is that even possible ? I made cap and tried this. It is like impossible. You could have done this for yourself.

    So that event can only be true if the player is played by a supercomputer. In my opinion.

    Then the sub events. 2 Groups. But i only need to look a the first group.

    That first subevent: A compare 1258's X when its X > Sprite43.x then ...

    Since this also had to meet the previous topcondition abs(Sprite1258.X-Sprite43.X) = 0, that gives maximum a difference of 1/2 pixel between 43 and 1258 to compare for. Wich is, i have to admid possible. But the subevent on that ....

    Again a comparing of the 1258's, this time if its X = Sprite43.X+600. I had to read it 5 times. Really ? Its X = Sprite43.X+600 ? Not ">" or "<" but '=' !

    So if 1258's X (wich is a moving bullet) is exacty Sprite43.X+600 (wich is a platformcontrolled object) then set direction 2 to some action ?

    So lets do the math. Lets say i am able to catchup the bullet 1258 with a platform based 43. In way that abs(Sprite1258.X-Sprite43.X) = 0. Meaning. In a way that their X's differend less then a pixel. Lets assume that it is possible. So Sprite1258.X = 10.2 and Sprite43.X = 10.1

    Then the sub event: Is Sprite1258.X > Sprite43.X ? ah yes it is. Its is 0.1 PIXEL bigger.

    Next sub-subevent: Is Sprite1258.X = Sprite43.X+600 ? Uh. No. not in a lifetime. They should be practical at the same place to meet the top condition.

    Well i feel dumb for looking at this. And in a last resort i renamed 1258 to "CockyOne". But that did't work either.

    Greetings.

  • Same thing as in this recent question.

  • I'd like to put the contents of a layout into another layout with an event. Pretty sure I can't do this. < Yes you can.

    You can have more layouts. You can switch to another layout with an action. If the objects in that other layout have the The Persist behavior, they will jump with you when you return to the previous layout.

    Just put them in a container to easy destroy them on level change.

    You can even randomly change to layouts. Like system > goto layout choose("trap","spikes","bomb","etc"). And then jump back ofcours.

    For positiong the traps, and for events that go with them, mayby you can use rexrainbow 's scenario.

    I never used that myself, just a tip.

    But there are other ways to position them, with functions by instance. A function for each kind of trap that you feed a position.