Guizmus's Recent Forum Activity

  • I'm not fast this time ^^

    Do you have a capx for me to see? It would be easier to help :)

  • I had some hard time to understand what you needed ^^ here is a sample capx of the use you described. I hope it helps

  • The simpliest way is to specify a second parameter in Array.At, to tell what Y you want.

    Want the question ? Array.At(Rnumber,0)

    Want then Nth answer of the Rnumber question ? (Array.At(Rnumber,N))

  • Here is the capx for the method I described. Works with any frame count. Functions can easily be changed to accept multiple instance of the sprite (just add a Sprite.UID argument on each call)

  • You should provide a sample capx describing your problem for more efficient help next time ;)

    To start with, how do you do your shoot ? Did you add a turret behavior on your character ? How does your bullet move ? With a bullet behavior ? If so, you have to change the "angle of motion" of the bullet when you spawn it.

    For this, do something like that : <img src="http://imageshack.us/scaled/landing/46/enk3.jpg" border="0" />

  • SigmundO

    First of all, your game looks nice ! I would love to see it finished :)

    Then, I got it to work quite simply. Your problem is a misuse of the function tokenAt. First parameter needs to be a string, and you give it a number. If you just add a "str()" around it, it works, like this :

    tokenat(str(Score), NumbersArray.Indeks, "")

  • You want to cycle randomly between the frames ? I would use a instance variable "framesToDisplay", initialy set to "0;1;2;...;x;", x being the frame count, and every time I need to change the frame, I would set the frame to round(random(tokenCount(framesToDisplay,";"))), and then remove the frame number from the variable. Once there is no more token (every frame has been used), regenerate the variable.

    As you will need to store the frames still to show, or the ones already shown, I don't think there is a solution without variable.

  • I'm not sure this is exactly what you need, but I needed to access global variables in some evaluations, but the variable name had to be a string parameter. So I wrote a mini-plugin doing just this, picking a global variable and returning its value by using a string as "variableName".

    Here is the plugin and a sample capx describing how it works.

  • Hey !

    What a nice post, explained, clear, .. everything !

    Let's try to answer.

    Just to start with, I'm also a "new full C2" user, and I've played around and found some of the same problems you did. Here is what I found :

    1/ Ennemy_type

    Let's talk about your function "onHit". You have to understand the picking mechanic here. As you didn't pick anything, everything is picked. All ennemies. All zombies and all purple sprites. The first action is then applied to all zombies that have "ennemy_type" set to 1 (so all zombis), and then the same appends for the purple sprite.

    So first, you have to pick your ennemy. How? By UID. Use ennemy.UID as "onHit" argument when you call it, and add a condition "Pick Ennemy By UID (Function.Param(0)) at the start of the onHit function.

    Then your 2 events (36 and 37 in the screenshot) will work, just replace "Zombie" and "Sprite" objects with "Ennemy" family.

    Having an ennemy_type variable is useless in this case.

    2/ LoS

    This one is going to be quick. Don't use a family for this. Don't use a container. Use the new "line of sight" behavior (introduced on r134, start of this month).

    3/ Instance Variables

    First of all, your icon visibility setting can't work like this.

    For example, whene the event 24 is triggered (zombie alerted, overlapping roof), you set the icon invisible. But at the same time, the event 23 is triggered, so you also set it to visible, every tick. Try to use sub events, like this

    Zombie IS ALERTED :

    • Zombie is overlapping roof, roof visible : set invisible
    • else : set visible

    Same goes for LoS (events 26 to 28)

    Next, you have to pick the ennemy in your function here too ! event 21, add a condition "Ennemy : pick by UID", and use the Function.Param(0) to specify the ennemy UID.

    I don't have time to go in the capx right now, but I will try to help more tonight, it can work, just need some more debug :)

  • Quite easily !

    Event : List->On selection changed

    Action : Call Function List.SelectedText

    If you create an event "on function XXX", XXX being the text of each of your options, you will have the respective function called when the user change the menu selected item.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Really nice thinking !

    I'm training myself on a TD also these days, and I didn't think of writing another turret behavior. Instead, I was checking for multiple enemies in range, ... and was crying over the basic turret behavior.

    Anyway, I really like how you worked on the rules of your game, choosing tower priority is not something available in every TD.

    Finaly, those sprites are really detailed. This all looks great, I'm looking forward to read more of your devlog :)

  • Shapter Ok, so the problem is that you try to assign a value to the array in a "ForEach in the Array" condition, but the value isn't accessible right now : you have to do your assign in the "ForEach in the XML" condition.

    Here is the same example, working. I deleted what wasn't useful.

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies