Citnarf's Recent Forum Activity

  • What do you mean by "Spawn monsters randomly"? Do you mean spawn them at random time intervals or spawn them in random locations on the map?

    For random time intervals and random location you could go:

    + System: Every Random(1000)+1000 milliseconds

    -> System: Create object BadGuy on layer 1 at (Random(LayoutWidth), Random(LayoutHeight))

    That would spawn an enemy once every 1-2 seconds at a completely random spot on your layout.

  • Win 7 x64 here too

  • This is so awesome! I'm loving the new UI, it has such a clean feel to it.

  • Basically what I'm trying to do is get a sprite to tilt left or right, depending on which key is pressed, but i would like this to happen in a smooth motion, so i figured lerp would work, which it does, but only for one direction.

    In the cap below, you can see that when the right key is pressed it rotates clockwise to a 45 degree angle, however when the left key is pressed it still rotates clockwise to get to 315 degrees.

    http://dl.dropbox.com/u/6660860/lerp.cap

  • If you want to just write a website from scratch, i suggest using Notepad++, its what i use, and it supports many languages (including HTML and CSS).

    http://notepad-plus-plus.org/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Basically what i think is happening is that if you move your mouse over them fast enough, the cursor can hit more than one of them in a single tick, so then on the next tick, it checks to see if your mouse is over "Sprite" which is true, so the else condition doesn't get called, hence why they stay highlighted.

    So lets say i quickly move my cursor from the first sprite to the second in a single tick, then on the next tick it says 'Is mouse over sprite?" which will come out as true, since my mouse is on the second sprite, so it won't call the else condition.

    I hope that makes sense, but its just a wild guess and I'm most likely completely wrong

    Edit to answer your edit: As far as i know, your not meant to make else events sub events, an else event will always attach itself to the condition directly above it.

  • How about this? http://dl.dropbox.com/u/6660860/select.cap

    Note: The order of events is important here, the mouse over event must come after the Always event.

  • 1. It seems as though the timer delay is causing this, I'm not sure if its a bug or not as i have never really used the timer before, but you should be able to overcome it by making an event like: Is gradient.width greater than 200? -> Set width to 200.

    Also, while your method seems to work just fine, personally i would use a private variable for "dash" instead of relying on the width of the gradient bar. Then you can set the width of the dash bar to (c/m)*w where c = Your current amount of dash, m = your maximum amount of dash and w = the maximum width of your dash bar when your dash is full. So it would look like: Always -> Gradient Set Width to: (Player('Dash')/200)*200. Then you would just need to adjust the value of dash and the bar will change width accordingly. But if you like your method, go for it , i just find variables slightly easier to work with.

    2. Can't really see what you mean here, seems to work fine

    3. As far as i know, this is a bug.

    4. Do you have the "Snap to Moving" and "Snap to Resizing" boxes checked? Also i noticed some of your Grass objects only had a height of 30 instead of 32, this can cause them to snap funny.

    Also, welcome to the forums!

  • The problem is with your bullet sprite, the hotspot isn't set correctly. Open your bullet sprite and select the hotspot tool and press 5 on your numpad to center it .

  • You can go with the random() option, but the most common ( at least that I've seen in games ), is doing like most humans do, target the closest one.

    To do this you could use pythagoras ( a^2 * b^2 = c^2 ), where a = object.X - target.X and b = object.Y - target.Y, do this to find the distance between all the targets ( on screen or whatever ) and check for which distance is the shortest. If some distances are equal, just take the first one or run the test again, considering the chances that something has moved.

    There might be a better way, but this idea popped into my head. Can't really consider it much though, as I am in class.

    You can do that a bit easier with the Distance(x1,y1,x2,y2) expression.

  • Awesome list! Thanks

    Mods should sticky this ASAP

  • Woah i thought it would be something simple, but not THAT simple

Citnarf's avatar

Citnarf

Member since 17 Mar, 2009

None one is following Citnarf yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies