vee41's Forum Posts

  • If you bought the game through steam I hear there is no link to download those, email support to receive the download link.

  • When firing bullet you'll have to give it a target position (or 'force' if you are using physics). I guess you are targeting player the whole time bullet is moving, while you actually want to target the position player is at when bullet was fired.

    Give bullet variables TargetX and TargetY where you save the bullets target location the moment bullet is fired and use these rather than player.x and player.y.

    This was just a guess, post a .capx of your problem so we can actually see what is happening :)

  • Hi guys and gals,

    So I've programs previously so I'm familiar with functions, I like the way I can group up code and call it when I need to so I'm not cluttering up my screen. When I code in construct 2 I'm not sure how divide up my code.

    Personally I prefer using lots of Groups to group things nicely. For example I have group called "Interface" that holds everything related to interface in it. "Controls" hold everything related to player controls. "Enemy Logic" could be stuff the enemies do and so forth.

    Lot of the time I find functions unnecessary, although they can be nice way of dividing your code into high level events that are executed in the functions.

    Combination of these works best for me: Grouping simple events (simplified via functions if necessary) into logical groups. So you have the 'high level' logic neatly as one single list, and all the dirt and detailed functionality in the functions or related events.

    These are just my personal preferences, hope you find some help in there :)

  • There is 'global' switch for every object, turn that on and object will persist through layout keeping it's variables and stuff. :)

    EDIT: wretchedshark For some reason I read question was about global variables as well the first time :)

  • What they said. :)

    I found it really hard coming into C2 with coding background. But when you realize that you don't actually have to think in grassroots level and can focus much more on the designing aspects it'll be sweet, I promise :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Couldn't you compare positions, averaging the result as a variable then set the speed to this value ?

    Exactly, something like: Bullet.Speed = floor(distance(bullet.x, bullet.y, target.x, target.y)-stopDistance could work. Also add an event that rounds it to 0 if it goes negative. :)

  • Should I consider the absence of answers means it's impossible ? or is my question not clear ? ^^

    Question : Can I use parts of a sprite sheet as individual objects in C2 ?

    or maybe: Can I use CSS code sprites in C2 ?

    I foresee that I will have to manually extrude each sprite from my sheets... what a pita -_-

    Googling something like "divide sprite sheet" should give you easier solution than doing it manually :)

    Something like this would be usefeul I'd imagine.

  • Could you post .capx or image of the problematic events?

  • > Problem seems to be caused by the fact that all your zombies are initially walking to the right(speed 30 is towards right) and facing left. You could either rotate them all to face right initially, or change their initial angle of motion to left.

    >

    > Nothing wrong with moonwalking zombies though! :)

    Thanks alot! I managed to solve all those moonwalking zombies :)

    How do you find my game? :)

    Really nice graphicstyle, great castlevania vibe! Looking forward to playing finished version :-)

  • What are you trying to do then? I guess I misunderstood your question as I was just trying to describe how 'trigger once while true' trigger works. You can use 'trigger once while true' with any conditions that would otherwise run each tick or loop, they don't have to be variables :)

  • Check this

  • Every object has 'count' variable which should work, you can call it like this: Object.Count

  • vee41 The break animation is a sprite itself, and the grass is a sprite itself. When you click on grass, i set it do do like this: When left clicked on grass, set position to Grass.Y, Grass.X.

    It looks like it is pretty advanced.

    The funny thing is, that if i do like: When left clicked, destroy grass. - that actually works, it just destroys the one that you click on.. which is that i need, i just need the animation to finish.

    Clicking action in itself does pick the grass object as you click directly on the object, it knows you intend to do the action on this specific grass tile. Having animation finish on another sprite has no way of knowing which grass tile you want to destroy.

    Add this condition to event where break animation finishes:

    Grass Pick Nearest to (BreakSpriteName.X, BreakSpriteName.Y)

  • Can someone please explain what i need to do?

    You'll need to specify WHICH grass you want to destroy. If you do not PICK any specific grass instance, the actions will be executed on all of them.

    Don't really know how you've build your sprites so I cannot give you exact answer. Is breaking separate sprite that is overlaid on grass tiles or is it animation of the grass tile?

    You'll need to specify which grass will be destroyed by picking it. I recommend checking the FAQ thread so you'll understand how picking works :)

  • For example:

    Variable = 1

    Trigger once while true

    .. Do stuff

    'Do stuff' happens only once, instead on running every tick while Variable = 1. When Variable changes to anything else but 1, nothing happens, and when Variable becomes 1 again 'Do stuff' is again executed once.