Guizmus's Forum Posts

  • If you want to use the predictive aim, you will have to let the turret aim for itself, thus allowing the rotation. If you want to have a similar behavior but with no rotation, I think you're going to have to write the aiming yourself.

    It's only a mater of maths though.

    PredictiveX = targetX + targetSpeedX*bulletTimeToHit

    Where bulletTimeToHit = distance(target,Golem)/bulletSpeed

    Just use this (and same for Y) to set your aiming, and do the shooting yourself. This way you can aim your golem without problem, use the turet behavior for target acquisition and shoot cooldown (the automatic trigger On Shoot), and even make your golem dance while he shoots. Ok, that last bit isn't essential....

  • Hello !

    Don't create a new subject for the same thing that your last one here : construct.net/en

    As you didn't get any response, nor linked any capx, I'll try to help you as much as I can here.

    If you want your object to stick to the surface of the water when it hits water, just translate my last phrase in C2 :

    Object On collision with Water -> Pin Object to water (position & angle)

    You will have to add a "Pin behavior" on your object to do this.

  • Hey !

    Just tried it out :)

    Concept fun and simple. Difficulty ok, but the timer seems too short for now, the player just have the time to get into the game and it stops.

    Pieces movement is nice, it's simple to distinguish between them and make pairs.

    I would love if the "chain text" was in a more obvious place. The time remaining on the freeze timer could be more present too.

    A current gameplay element in this type of game is that the timer can be refilled by playing well. You could maybe add 1 / 2 secondes to the timer for each pair done ? Or depending on how much combos you just did ? This would make it lot more addictive.

    Good FPS on my computer here (and it's an old dusty computer)

  • Hello aznmonkeyboy

    First of all, here is the capx.

    I started off the "tower defense template", so there are lots of useless thing for the example.

    There are 2 types of enemies, one red and one green, spawning randomly. there is a debug at the bottom of the screen, displaying when a turret acquires a new target the target position, and the instance type.

    There are 2 ways to do it, I did both in the capx (just un-comment the second one to test it out).

    Solution 1

    Sub events

    If you have a finite number of enemies (not too high), you can do a pick by UID like you said, and do one for each enemy type. If the current Target isn't of the type you first pick, it will return false, and the runtime will go to the next event, checking next enemy type. Problem, lots of code to copy past for each enemy.

    Solution 2

    Families (need the personal version at least)

    Put all your enemies in the same family, and then you can pick the current target as a family. You will then be able to access all of family parameters. This means you will have to move your variables from the enemies to your family if you want to access them.

    I hope this helps !

  • Not sure, that's strange... Could we take a look at the capx to help ? ^^

  • Hey Angel

    So I took a look at your capx. Here is my "iteration" on it : capx

    What was the problem you are going to ask ?

    Well, if you open the capx, let's take a look to the event 8. When the last couple is taken, you will start by waiting 0.5 sec, making this event "outside of the timeline", meaning other events will trigger while. When it triggers though, the "substract 1 from min_par_NoMatch" will make the event 12 trigger before the reset of mini_par_Card1 & 2 triggers (line 11). (please traduce your variables next time you need help ^^ i had hard time understanding the program at first, comments are nice too :p)

    So well, the cards were being redraw and then destroyed by the event 7 retriggering...

    I changed it by checking that mini_par_card1 was >0 in event 8.

    On the side, I modified the function "placeCards", as it seems you didn't know the loopindex("name_of_the_index") function, that would have saved you a lot of trouble ^^ I let your event, commented, so you see what i did.

    Hope this helps !

  • If you want an enemy to go into the base, you need to tell him where exactly. Your problem, if I understand right is that they all stack in the center. So don't do "Find path to hangar", but "Find path to (X,Y)" where X = hangar.X+random(hangar.Width) and Y = hangar.Y+random(hangar.Height); they will all find their way to a random point inside the hangar. If your problem is that they should stop moving once inside the hangar, ramones' solution is the one you need :)

  • irina Maths are your friend ;)

  • SigmundO

    You can place it here, but create a sample capx that shows the problem and uses only built in plugins and behaviors ^^

  • Well, I used the file you posted in your bug report (http://db.tt/tnGngg2X) (empty project, you seem to have the problem everywhere anyway).

    I didn't get any problem, display size keeping the intended resolution, both on chrome, IE9, or Firefox... Maybe a config problem on your browsers? Strange that it appends on multiple ones at the same time though, hard to understand.

  • Hey kmsravindra

    If you can't use .htaccess, the best way to do what you need is to do it in PHP.

    You said that the platform sends a lanch key. So just change the index.html into index.php and add a check on the key. If you receive a valid key, display the page, if not, display an error message.

  • Of course, just tweak the function ^^

    distance(sprite,target)/distance(spawn,target) (let's call this P) is going from 1 to 0, representing the proportion of the distance still to travel. If you do pow(P,X) (where X is between 0 and 1, strictly) you will get a curvy function, not linear anymore, still going from 1 to 0 (0 power X = 0 and 1 power X = 1, when X>0 so we are ok).

    Examples :

    For X=0.5

    scale at origin is 100%

    scale at 30% of the travel is 84%

    scale at 50% is 71%

    scale at 70% is 54%

    Scale at 90% is 30%

    scale at destination is 0%

    For X=0.8

    scale at origin is 100%

    scale at 30% of the travel is 75%

    scale at 50% is 57%

    scale at 70% is 38%

    Scale at 90% is 16%

    scale at destination is 0%

    When X approaches 1, you will get a more linear function.

    When X approaches 0, you will get a more curvy function.

    You just have to try now :)

    EDIT : lerp would help also, it's true, but it won't work if the sprite can go both ways, or if you want to have always the same scale at the same position, because lerp will be time-dependent, "smoothing" the changes in the scale. Because of this, the scale would adjust depending on the sprite movement/speed over time, not just its position between origin and destination

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It doesn't glitch in an empty project for me. You should post your capx as the problem is certainly elsewhere, not sure anybody can help you without more infos.

  • scale = initial scale * distance(sprite,target)/distance(spawn,target) ?

    If you are going for a linear scale based on the position, you should do it base only on distances, so completely independent from the timeline. Or maybe I misunderstood you ^^

    Put this in an event triggered every tick if the sprite "is moving", and you should be good

  • I don't have any capx for the example you linked, but it seems like the "water" effect is applied to the water, with decreasing parameters (lerp over time ?), and parameters going up when a rock hits it (depending on the rock's parameter maybe ?)

    Well, I tried a little and it started to resemble your link, but it seems quite a lot of understanding of this effect is required to do it well (or a lot of tries at least). Help from someone knowing it more would be welcome :)