thatserafimkid's Recent Forum Activity

  • You could set the gravity back to 5 on left or right arrow released trigger.

    Either that or depending on what you are doing with the arrow keys you could use Left arrow is down or right arrow is down instead of on pressed. You could add an else to the is down event

  • Set Car.MaxSpeed to Car.MaxSpeed + 2

    Right now all you're doing is increasing the value or your speed variable but your not increasing the speed of the car behavior.

  • You have to pass the input from the peer to the host so the host can handle the tracking condition. All I did was add new inputs to the peer and host group to handle the [ and ] presses. So it passes the info to the host on client update.

  • You would just gave to reposition the shadow based on what direction your car is facing.

  • NormalOne

    When you use random()

    Its going to randomize a number somewhere between 1 and 2. It will never be 2 and very rarely be 1 because it'll give you numbers between 1 and 2 such as 1.2, 1.4 ,1.5

    So in your code your looking for when the number = 1 and this won't happen very often.

    It seems like you're looking to do it half the time.

    So do what Magistross says, it will still randomize the number the same way but then the floor command will round the number down to a whole number. So if you got 1.2 the expression would evaluate to 1 and then the rest of your code would run.

  • derikvlog

    Just create a sprite shadow and give it the behaviour PIn. Then on start of layout you make an action to pin the shadow sprite to you car sprite Position & Angle.

    Let me know if you have any trouble with that.

  • Hunter

    For your code game you could have all your numbers as one object, and just have the different groups be an instance variable that separates them. So you could have one sprite with 3 animation frames. and copy it 3 times and give one instance variable 'GroupName' A, then B for you second copy, and so on. Then in your code you can just change the animation frame instead of deleting and creating a new object each time. Then with tokenat you can evaluate if Sprite Group A Current Frame = tokenat at index 0. Then check group B frame at index 1, and so on. Let me know if you still don't understand

    as Somebody mentioned a tokenat is basically a one dimensional array. You can store a list of items and have them separated by a character. Let's say you made a list of your friends name

    "Jon,Michael,Ben"

    You could find out who the 3rd person on the list is by using tokenat.

    You could do tokenat("Jon,Michael,Ben",2,",")

    This would return "Ben"

    You just have to remember that just like arrays tokenat has index 0. So the first name is at index 0 and the second name is at index 1, and so on.

    The seperator is just what it says. You tell tokenat what you used to separate your list. So in the example "Jon,Michael,Ben" we used a comma to separate our names. So we let tokenat know that every time it sees a comma that its beginning the new index, in our case new name.

  • You need to save totalkills to webstorage each time its updated in your game. And call it once on start of layout to set totalkills to webstorage value.

  • You're welcome I'm glad I could help you guys out.

  • Hmm it works for me on my computer.

  • You are very welcome. Glad I could help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here. You had put the spawn laser code in the wrong section. It should go under Common Group so peers and host can see it.

    I moved some bits of your code around so there's a chance some of the notes don't match up anymore just so your aware.

    You're going to also want to change your code to test for hit on tank collision with laser instead of the aim spot. But I assume you knew that and you're getting to it.

thatserafimkid's avatar

thatserafimkid

Member since 28 Mar, 2014

None one is following thatserafimkid yet!

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies