Thompson5's Forum Posts

  • 8 posts
  • This is genius. It works perfectly well and I have learnt something to boot. Cheers.

  • Hello,

    I have one sprite called "Coral" and this sprite has one animation with several frames, the frames are all different visuals of corals. I want to be able to pepper around this one sprite and using code create a random assortment of corals.

    I wish to do this so that I don't have to create a bunch of sprites and I don't have to place them all myself. I want to do this because of the cool effect I believe it will have.

    I have tried to use the following events but all the sprites simply start at the same place and go through all the animations. I believe there is something I am not getting, I have tried many different solutions including stopping the animation etc.

    <img src="http://img208.imageshack.us/img208/1590/problem01j.png" border="0" />

    I am probably making a silly mistake, but if anyone can see it or can suggest a better option, I would be thankful.

    Regards,

    Ian

  • Ops over sight on my part.

    I'm going to leave this for a while, do some simpler projects and come back to this at a later date.

    Cheers for all the help Nimtrix

  • Hello,

       So far my RTS game is going quite well, I have GUI, movement, Resource Gathering, and unit movement. Next I have been trying to wrap my brain around how to do combat.

    Now I'm hoping someone here can talk me through the best way to do this? I have been playing around with a few events; trying to adapt the movement code in order to create attack code. This is not working to well. I've re-written it a few times.

    What I've been trying to do is if the player right clicks with a selected unit on an enemy then set GotoX GotoY (like you would for movement) and turn attack on, then start to move towards it, once the unit is within certain X,Y of the enemy then subtract health and set attack to false.

    Though this doesn't seem to be working. It gets to the position, then freaks out and the health of the enemy doesn't go down. Below is a screenshot of my event sheet;

    <img src="http://img713.imageshack.us/img713/8917/problem01.png" border="0" />

    I'm not sure if I'm doing it right, any help would be appreciated.

    Kind Regards,

    Ian

  • Ah the expression was the thing I was struggling with. Thank you very much, I understand what I was doing wrong now.

    Regards,

    Ian

  • Hello,

    I'm trying to play around with the properties of the bullet function. I'm trying to make it so that it simply rotates the bullet modifier but not the sprite. I understand that you can set angle of the bullet separately but where as when you are setting the angle of a sprite you can set its angle towards two points, you can only set the bullet towards one point. I have been racking my brain trying to make it go towards an X,Y position but am not having much luck.

    I hope I have been clear enough. I'm trying to create side-on RTS(style) movement, for which I don't want the sprites to angle towards the point, because they turn upside down at certain points.

    Regards,

    Ian

  • That's perfect, I will review it and try to apply it to my own script.

    Thank you for the speedy reply.

  • Try Construct 3

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

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

    I'm new to this software (24hrs or so) and I have been playing around and have created a simple RTS movement event sheet. There is just one problem, everything works but when the sprite reaches the point it was told to go it simply spins on that point.

    Now my code(?) below shows you that I have tried to implement a variable that when the sprite reaches it's assigned location it gets set to another number and thus the sprite should not still be trying to reach the point (or face it).

    <img src="http://img507.imageshack.us/img507/8917/problem01.png" border="0" />

    I feel there is something I'm not getting here but I have tried a few different methods but with no real luck. Any help would be most appreciated.

    Regards

    Ian

  • 8 posts