• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. đź”—Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Pinzu
Reaction score
78

Profile posts Latest activity Postings Experience Media Albums Resources About

  • The main problem was that you were trying to initialize structs from the globals block, whose initializers needed to be moved to the onInit method.


    library BuildingLib uses Table
    struct BT // Building Type
    Table taOrder //= Table.create()
    Table taIndex //= Table.create()
    //TableArray ta = TableArray = TableArray[0x2000]

    private static method onInit takes nothing returns nothing
    set taOrder = Table.create()
    set taIndex = Table.create()
    endmethod

    //static hashtable hash = InitHashtable()

    static integer count = 1

    static method create takes integer id, string order, integer limit_1, integer limit_2, integer limit_3 returns BT
    local thistype b = .allocate()
    set BT.taOrder[String2OrderIdBJ(order)] = BT.count
    set BT.taIndex[id] = BT.count
    //call SaveInteger(BT.hash, String2OrderIdBJ(order), 0, BT.count)
    //call SaveInteger(BT.hash, id, 1, BT.count)
    set BT.count = BT.count + 1
    return b
    endmethod

    static method getBuildingIndexByOrder takes integer order returns integer
    return BT.taOrder[order]
    //return LoadInteger(BT.hash, order, 0)
    endmethod

    static method getBuildingIndexByType takes integer uid returns integer
    return BT.taIndex[uid]
    //return LoadInteger(BT.hash, uid, 1)
    endmethod

    static method getBuildingIndexByUnit takes unit u returns integer
    return BT.taIndex[GetUnitTypeId(u)]
    //return LoadInteger(BT.hash, GetUnitTypeId(u), 1)
    endmethod
    endstruct
    endlibrary
    The dialog should dissapear after one minute. Sometimes, players can quit while the dialog is up, so then you might have to wait for it to time out.
    I would keep both if you have, or struct if you dont have functions, because some people dont like how struct access looks like, and some people dont like to call functions
    You have been asking a lot on the forum huh. It looks like you're busy with a project. By the looks on your album, it is some kind of realistic warfare in the time of the Greeks.
    I used Ammorth's Multibars. Really cool and easy to use! Comes with a whole set of skins.
    Can't look too close into your code today. I suggest you just update your thread
    once you think it's worth an update. Then I can give tipps about potential improvements.

    Configuration should be placed outside, if allowed to be customized by the users.
    Everything else can run within the struct and onInit.
    "Hegemony" would actually be a great name, accurate and catchy.
    I would gladly give you feedback when your beta is done ;)

    Each city has its own god or you can choose like like in AoM ?
    If you have an event called "A unit finishes training a unit", then GetTriggerUnit will refer to the building.
    No you wont.
    The bugs only exist for the health and mana so the concept of the other ones would be completely different.
    For the others you can just create abilities that would give you a nice amount.

    You can also choose to create a few abilities with all 10 levels and set them up like this:
    Level 1 = (abil1)0, (abil2)0, (abil3)0
    Level 2 = (abil1)1, (abil2)10, (abil3)100
    Level 3 = (abil1)2, (abil2)20, (abil3)200
    Level 4 = (abil1)3, (abil2)30, (abil3)300
    etc

    and with the proper combination, you can get every possibility between 0 and quite a big amount.

    You can also choose to make several abilities with 1 level:
    Abil1 = 1 bonus
    Abil2 = 2 bonus
    Abil3 = 4 bonus
    Abil4 = 8 bonus
    Abil5 = 16 bonus
    Abil6 = 32 bonus
    etc

    and with the right combination of giving and removing those abilities, you can create anything up to double the amount of the last ability minus 1.

    There should even be a system for this already.
    The give health snippet is just too usefull to have only in those systems.

    Search for Custom Stat Systems in the spell section.
    If you are no longer interested in finishing the system, that's alright. I might use it as a base if you do not mind.
    Hey, welcome back! Just wanted to know whether you are going to finish coding your simple hint generator system or not. I think it is a very useful system.
    I did look at it! I just didn't quite understand the question, and am not sure if i had the answer. The system looks good. Saving the previous tile is very important imo, with Psons old approach he would have had farm tiles all over the map at some point!
    I guess, but i saw you were asking for help about a custom resource system - it just so happens i just made such a system with supports an arbitrary amount of resources (up to 744 different resource types), a multiboard to display them, complete freedom of declaring which harvest abilities are needed to gather which resource and which building will serve as a dropoff (you just add an ability to the building and the system handles the rest). It is very user-friendly and easy to set up. Let me know if you are interested!
    Well that is quite interesting, though i was actually refering to coding. I have too many models waiting in line right now (lotr, medieval knights, halo, modern warfare soldiers, zombies) and lots of modeling requests to manage. Writing a piece of code though is a piece of cake and i could do that in minutes.
    Hey, i couldn't help but notice you are making an ancient themed map.. will we be seing a project page soon? :)
    Finally getting back to the ship movement for a bit.

    The movement system will have to change a little bit so that I can do collision knockback properly.

    The noticeable difference is that ships won't move exactly towards their facing angle while turning. You'll see soon enough :)
    I am having problem with 1 line that I don't know how to type it. "Angle between X and Y" it looks in good order otherwise.
    I'm curious, did it work? Or you need a GUI version? xD

    I created many spells like this but this instance I haven't tested yet as this certain PC is old.
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top