Calfuso's Recent Forum Activity

  • When i try to make a sprite switch to random animations i write in the words exactly like you did and i keep getting the error message "expression seem to end before here. are you missing something before it. Other then that the information was very helpful.

    You didn't write etcetera, did you?

    I did now and it still says Syntax error Expression appears to end before here-are you missing something before it? What should i change in the expression?

    http://postimg.org/image/jywfrk74d/

    An answer please? I posted a image so it should be clear what you should help me whit.

  • >

    > > You could also use choose instead of random:

    > >

    > > For animations

    > >

    > > > sprite set animation to : choose("animation1","animation2") etcetera

    > >

    > > For spawning at imagepoints

    > >

    > > > sprite spawn object on layer at imagepoint choose(0,1,2,3,4,5)

    > >

    >

    > When i try to make a sprite switch to random animations i write in the words exactly like you did and i keep getting the error message "expression seem to end before here. are you missing something before it. Other then that the information was very helpful.

    >

    You didn't write etcetera, did you?

    I did now and it still says Syntax error Expression appears to end before here-are you missing something before it? What should i change in the expression?

    http://postimg.org/image/jywfrk74d/

  • You could also use choose instead of random:

    For animations

    > sprite set animation to : choose("animation1","animation2") etcetera

    For spawning at imagepoints

    > sprite spawn object on layer at imagepoint choose(0,1,2,3,4,5)

    When i try to make a sprite switch to random animations i write in the words exactly like you did and i keep getting the error message "expression seem to end before here. are you missing something before it. Other then that the information was very helpful.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • every 4.0 seconds

    for each enemy

    --- create bullet at (enemy.x, enemy.y)

    --- bullet: set angle to 90*int(random(4))

    That information was helpful and now i know how to make a enemy shoot in random directions. But i still want to know how to make enemys spawn in random image points of a sprite and how to make enemy switch to random animations. I tried usiing the same solution as for shooting in random directions but it does not work.

  • How do you make an action based on random? I know about the random expression but i don't know how to use it. I don't want you to explain it. You should make a capx whit an enemy that can do four things. Shoot up, shoot to the rigth and shoot to the left and shoot down. The enemy should have a 25 % of doing onw of those four things every four seconds. The enemy should be completly coulored green and nothing else and the shots the same. Then share it whit a link in some way. I have asked this question before but now i ask it whit more clearity.

  • The player sprite is visible and that,s godo and all but since it is set to always be visible so can it not flash. And the player sprite being able to flash is important. To make it only be visible every tick when the player is not flashing you would need a is not flashing event you could follow whit every tick set visible. Too bad there isn't a event liek that, only a is flashing event. I think you can create your own event types but i don't know how. How do you do it or is it another solution?

  • So since you found out there's a problem with the sprite getting set invisible every time, you have to find the line of code that sets it to invisible every tick (or whatever).

    To do that:

    use the search function (CTRL + F) in event sheets, use "set invisible" as search term (without the quotes). I suppose in one of your relevant sheets there will be an event setting your sprite to invisble.

    If there is none, then my only idea would be something like a (third party?) behavior or code, that somehow leads to that... but it's unlikely.

    Your solution did not work but it gave me the idea of another solution.

    Event: System: Every Tick

    Action: Sprite43: Set visible

    And now Sprite 43 is visible. Problem solved.

  • Just answer.

  • Can anyone answer please? Even if you havent solved the problem atleast tell me something about what you think the problem is. It has been a long time now since anyone replied.

  • Havent tested it but try something like this

    "direction" global number variable at 0

    'On collision sprite with the player ' Event

    'add one to direction' action

    'direction is greater than 0' event

    'every (speed) seconds' event speed meaning lower decimal higher speed

    'simulate platform left' action

    'direction is greater than 1' event

    'every (speed) seconds' event

    'simulate platform right' action

    'set direction variable to 0' action

    'every (speed) seconds' event speed meaning lower decimal higher speed

    How do you create this event? I used compare speed and i couldn't write in that. How do you write in that? Do you use another type of event?

  • Have anyone solved it yet? It has been a while since i posted last. Atleast tell me some information you found out about the problem.

  • Please don't commenate on my project when you reply whit an answer.

Calfuso's avatar

Calfuso

Member since 23 Jun, 2015

None one is following Calfuso yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies