Leralasss's Forum Posts

  • You shouldn't use families for spawning like that. what you can do is:

    local number UID = 0

    decide to spawn catapult / melee

    create catapult / soldier

    set UID to catapult / melee.UID

    then pick friendly with variable UID

    set isFriendly to differentiate between Friendly Unit and Enemy unit

    treat both objects the same...

    ____________

    P.S.:

    when you create a catapult, it will automatically be a member of BOTH families (all families that you assigned it to), so you can pick either friendly or enemy with UID

    Also: the Familiies dont help to differentiate between enemy/friend if both objects are in both families.

  • Hi again,

    i am afraid that didnt work (they pass through each other), what am i doing something wrong?

    Thanks

    Nico

    That doesnt work because you check the isFriendly Boolean for the same object, its like checking 1<>1 and expecting it to be true

    what you can do: (your setup is i think: catapult and melee object, both in 2 families right?)

    (when you check if in range you do this with a "for each friendly" loop right?)

    (here in code so the indent is there)

    for each friend (friend = family):
        condition: 
             INVERTED: pick enemy with UID friend.UID            //dont pick enemy with the same UID as the friendly you are just looping through
             pick by evaluate: enemy.isFriendly <> friend.isFriendly              //pick enemies that are really enemies (isFriendly Bool is different)
             pick nearest enemy (enemy = other family)
                  here check range from friendly to enemy family (bbox or what you want)
    [/code:2vsxg5ty]
    
    note that you can do this here because you use 2 objects (family which you loop through, and enemy)
  • I want to integrate Kongregate Statistics into my game, but the Kongregate Plugin for Construct 2 isn't available for Construct 3

    Is there still a way to do this?

  • You are a small cell battling against an infection.

    Choose from many different body parts and customize your play style with skill trees

    Can you beat the infection and be the cure?

    Here is a promotional picture:

    Here are some screenshots:

    The game is on Kongregate:

    kongregate.com/games/Mirakos/petrisquare

    Don't forget to comment and rate <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

    Made the game together with

  • Touch > On touched > ButtonYes > AnswerPanelYes > Set Effect Parameter....

    with one action you can change 1 parameter of an effect

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Keyboard:

    Keyboard currently has:

    Keyboard.StringFromKeyCode

    Keyboard.LastKeyCode

    What would be nice is:

    Keyboard.KeyCodeFromString

    Bullet Behaviour:

    you currently cannot set "Set Angle" with events (that the bullet sets the angle of an object automatically to angle of motion)

  • in Events:

    Object Actions - set effect parameter:

    Name = "ReplaceColor"

    Parameter = the parameter which you want to change (0 would be source color)

    value = value

  • Hello!

    Is it possible to get the Collision Coordinates with the Physics Behaviour?

  • Hello!

    Is there a Plugin where i can get or set an Instance Variable by name?

    Example:

    Player.instanceVariable("my_var")

    and then also an event where you can set by name

  • Black Screen happens to me when there is an error somewhere in my events.

    e.g.:

    RegexMatchAt("somestring","[","") because "[" is not a valid Regex. There are some other reasons where a friend of mine had a blackscreen too but i don't remember what it was. (maybe it was infinitely spawning sprites in one frame or something)

  • my object is outside of the sprite.

    i get the vector from the object to the nearest image point

    is it possible to get the Normal vector to the hitbox?

    edit:

    and the hit point too?