SpyDaniel's Forum Posts

  • I'm trying to set up a random left or right movement once a counter I have set up reaches 0. The thing I need to do is either pick -100 or 100 so that the player will be moved left or right, randomly.

    I tried random(-100,100) but it will constantly move left or right because it is picking numbers constantly.

  • Hey all. I have custom movement set up but I have an issue I want to get rid of. When I hold down W or S and also A or D then the animation stops and the player just slides up or down the screen. Is there some thing I am missing to stop this from happening?

  • Pulstar thanks for the detailed examples, this has helped me a lot! I'm going to try it out now that I understand how to do what I wanted.

  • Hey all, would anyone know of a string I can use that would add to a variable when the player attacks? I want to set up a mining simulation, so when the player attacks and the object loses hp, it will add or not, to the variable.

    So for example the player could attack 3 times and get nothing, but the 4th it would give, but completely random as and when the variable gets added to.

  • Right click on that window and choose "add animation". Then when you attack with the knife, change the animation, then have the animation change back to the gun once the knife animation has finished playing.

  • I'm guessing you could make a new layer and have clickable sprites that would take you to the starting area and load in the character sprite you wanted. Not sure on the events, but I think it woul be simple enough, just have the player sprite be a simple 1 pixel sprite, then on the character select layer, have an event that replaces the player sprite with the one you click and then load the new layer.

  • Give your chests their own instance variables instead of using global. Then amend the events for the chests to use their instance variables.

  • Could you link to the save file anyway so we can have a look, it would help noobies out like myself and more experienced users to comment on how it was done

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so I have the animations named (for now they are just single frames of different angles) and I have set up events and actions in which I think should work, but I am not getting the results I wanted. I'm not quite sure if what I have it right etc.

  • I was mistaken and what I said is not the fact. It just looked like it because I overlooked the fact my sprite is a top down view.

    abs(self.8waymovement.angleofmovement/45) just gives me errors and wont let me click done.

    I have added my sprite and given it the frames, but I have no idea as of yet how to make the animations. I can only add new frames to the sprite.

  • Thanks guys. I tried most of what you said, but I kind of stumbled upon the fact that if I set the frame to the angle the sprite is facing and then stop all animations in events and then set the frame to the one matching the sprite in the layer, the 8 direction behavior takes over and it works like a charm. I can't believe how well this engine works, it truly does help the non programmer make games. I can upload an example file if anyone wants to check it out for what I wanted?

  • I have 8 sprites which have different degrees of rotation. I want to be able to set it up so when the object moves it will change the sprite. So if I tell it to move top right it will show the 45 degree sprite and so on. For an example I want the moveable object to act like units in Red Alert or simular RTS games.

    Forgive me, I have only just started using the program and have also looked through examples but can't figure it out.