Nifl's Forum Posts

  • It's hard to tell exactly what the problem is without a cap. The Trigger once is easily replaced with a private variable. Call it "Reload Time".

    + Weapon: Value 'Reload Time' Equal to 0

       -> Weapon: Set 'Reload Time' to -1

       -> System: Create object reloading on layer 1 at (Weapon.x, Weapon.y)

       + reloading: Animation "Default" finished

       -> reloading: Destroy

       -> Weapon: Set 'ammo' to 3

       -> Weapon: Set 'Reload Time' to 3

    Every time you subtract from Ammo (When you shoot i guess) just subtract 1 from Reload Time as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I Have been trying now for a very long time to create a system that loads information from a .txt file (called "Dwarf.txt" in the example) and adds it into a Hash table.

    How

    The .txt file is made so that each line represents a value, ex:

    Race

    Dwarf

    Agility

    100

    Strength

    105

    Intelligence

    100

    Charisma

    90

    and so on...

    I have successfully added all even line number values to 1 ListBox object, and all Odd line number values to another ListBox object. This has created 2 lists, one with the name of the attribute, and one with the value of that number (so to speak).

    I Now Play a loop 27 times,

    Each Time the loop plays, I

    Insert a key equal to ListBox1's Line Text on the Line equal to LoopIndex. That Key is given the value of ListBox2's Line Text on the Line equal to Loopindex.

    Now I don't find anything wrong with the events/actions, and keys are added as I said.

    <font color=red>THE PROBLEM</font>] is that the keys are all messed up. Several keys may be OK, but some of them are really strange, named after all sort of code and other keys...

    I Included a .cap and a .txt object for testing. Its .Zip

    yourfilelink.com/get.php

  • Just solved that problem Myself. :]

    Condition:

    (Floor(Sprite.Value('ID')/2)) * 2 = Sprite.Value('ID')

    "Floor(X)" means to round DOWN (X) to whole number.

    "Sprite" is the name of an object.

    'ID' is the name of the private variable of that object.

    Lets say the number you wanna test if it is an Odd or even number is 1.

    (Floor(1/2)) * 2 = Sprite.Value('ID')= FALSE (It is an odd number)

    (Floor(2/2)) * 2 = Sprite.Value('ID')= TRUE (It is an even number)

    How?

    1/2 rounded down is 0, because 0.5 rounded DOWN is 0, therefore condition is FALSE because (0 * 2 =/= 1)

    Now say the number you wanna test if 2 is an Odd or even number.

    (Floor(2/2)) * 2 = Sprite.Value('ID')= True

    How?

    2/2 rounded DOWN is 1, because 1.0 rounded down is 1.0, therefore condition is TRUE because (1 * 2 = 2)

    Hope I was clear enough and understood what you wanted.