Nifl's Recent Forum Activity

  • Man, that's brilliant. I would never have figured that out! Thank you very much for your help and for your time Jayjay. This will help me make my game a lot less CPU-demanding. <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe I know what you are trying to do :]

    yourfilelink.com/get.php

    Edit: Sry Arima, were Irl buddies. ;]

  • I'm trying to make a game in which you have line of sight to objects Now there is really only one type of sprite object in the game except for the player's sprite which needs to be considered, but the line of sight behavior is just not working correctly. Even if it was, It kills the frame-rate.

    This is an example I made which uses the same system as I do in my larger application. In this example I try to work around the the line of sight behavior.

    The <font color=red>problem</font> still remains though. <font color=red>Any good Line of sight vision I can come up with is way to CPU-intensive to be efficient.</font>

    <font color=yellow>Cap File example</font>

    yourfilelink.com/get.php

  • Just Upload the .cap and I think this will be solved very quickly by some random clever mod. <img src="smileys/smiley36.gif" border="0" align="middle" />

    Use this site if you don't wan't to register or do anything else, Really fast.

    yourfilelink.com

  • The keys appear to be fine to me. Each name has the correct value. What language do you use with windows? If the language uses 2 bytes per letter then perhaps the listbox is causing the corruption?

    This cap doesn't use the listbox object:

    http://dl.dropbox.com/u/5426011/examples6/txtToHash.cap

    run in debug mode to see the populated hashtable.

    Thanks R0J0hound

    Well, that application sure worked a lot smoother. <img src="smileys/smiley4.gif" border="0" align="middle"> Seams Im using Swedish. (though not sure how Windows figured that one out as absolutely nothing in the system is displayed in Swedish) Never the less, the explanation that its the system (and not I) who messed up is very comforting. Ill just have to work around the Listbox object as a means of storing data in any manner and just use it for displaying.

    That's some brilliant coding there by the way. Ill need to customize it a lot, but I will use it to fall back to if something happened. Thanks again for the help. Now (soon) I can finally start working with the actual game and not just the engine for it. <img src="smileys/smiley36.gif" border="0" align="middle">

  • Thanks for the response Sandcrawler, I have thought about using an INI file. I have never done so, but figured it wouldn't be a problem to learn. The thing is though that I have a very hard time to let go of a problem that is unsolved, and that I believe can be solved. If its a bug then fine, I will move on. But if it's not and Im just doing something wrong, well the thought of that frustrates me beyond description. I feel that I need to solve this problem or I will never use Hash tables again. With is sad...

  • 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.

  • 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.

Nifl's avatar

Nifl

Member since 30 Aug, 2011

None one is following Nifl yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies