| 04-19-2004, 01:10 AM | #1 |
I think the answer to some of these questions maybe in jass but if not then just move me ^_^ 1. How do I disable game messages 2. Disable units from being clicked 3. Bounty not given 4. How do i create global vars via jass 5. Class systems in jass, ?? 1 - ie the message that comes up when you need more food to create units, its says build more moon wells to continue unit production, well i changed it to an empty string and it still shows up.. help. 2 - theres a map, scary forest 2, and in it there are these custom models that go back and forth and if you get near them you die but you cant click on them, nothing happens, its like trying to click on water. how do i create the same effect on a unit in my map? 3 - when the killing unit is null (happens when a unit is killed by a missle from a dead unit) the bounty isent given to the killing unit, any way i can fix this? 4 - I have a collection of triggers that use a bunch of global vars and I wanted to know if I could just include a jass trig that would create the global vars they need instead of typing the global vars into every map i want to use the triggers in. 5 - AIAndy recommended implimenting a class system to someone who wanted to know how to store information for diff cards in a deck for a map that person was making, can someone point me in the right direction about class systems in terms of learning what they are/how to make one? thanks For Your Help I Give Thanks! ^_^ |
| 04-19-2004, 04:58 AM | #2 |
What do I have to do for answers..? :( *gives everyone a cookie* |
| 04-19-2004, 06:23 AM | #3 |
You have to just wait for the answers. We are not always online. 2. Unclickable units usually have the ability Aloc (locust). 5. I made a class system using gamecache (http://kattana.users.whitehat.dk/viewfunc.php?id=244 ) |
| 04-19-2004, 08:03 AM | #4 | |
Quote:
Now, Someonetellmehowtodo 1. 3. 4 PleaseThankYou!!! |
| 04-19-2004, 10:25 AM | #5 |
1: Impossible 2: Impossible 3: Impossible Nah, atleast on officially, the thing is, alot of people think JASS has more power over the game...but in reality, JASS has almost just the same functions as GUI does, plus a few that are not available in GUI, but are less trivial/useful. And often used inside other function (f.ex., Fade Filter automatically uses a not-in-GUI function named EnableUserUI...which toggles tooltips and Health-bars)... but that's really it, the true power of jass is that it's text-based, and it's algorithm-possibilities, and it's function-orientation. Anyways, that's just officially, but you can do many things to emulate it...but that's more work. I can't really give many suggestions at the moment, (3) but one might be to disable Bounty of all units in the Object editor, and implement your own bounty system... then it's easy to disable bounty in-game. Cubasis |
| 04-19-2004, 04:45 PM | #6 | |
Quote:
<insert bad names here> 1: Impossible 2: Impossible 3: Impossible 1 is possible, people have done it, its messing w/ the custom gui opt in the world ediotor, it just wont accept a blank string though 2 aiandy told me how to do, see previous post in this thread 3. alredy tryed my own bounty system, the problem lies in the core of wc3 with its get killing unit function, sometimes it just cant tell |
| 04-19-2004, 04:49 PM | #7 | |||
Quote:
what does that code do? can someone add comments to it pls. so far i have: creats trigger Kill adds event Unit Enters Region udg_death what does Filter(function UnitFilter) do?! then it adds the action ActionFunc What I bet the trig does is when a unit enters a region in any of the listed regions in UnitFilter it kills the unit if the owner is not player 10 but HOW !!!!!!!!!!! helppppppp meeeeeeee plzz I dont understand the Filter(function UnitFilter) bit and I dont understand how it can go througha ll the regions, what is it doing?! commented code pls... :( -- question #7 --- Quote:
--- question #9 ---- Quote:
Thank you for helping ^_^ update: only the questions answered by aiandy have been answered.. no one else wants to help me?? :( :( |
| 04-19-2004, 07:03 PM | #8 |
Eh, firstly, I ment questions 1, 3, 4... 2 is possible as AIAndy said. And your question is how do you "Disable" a game message, ... and you then said that it didn't work to set nothing into the field...so thus, as there is no other way to change a UI text. Then there is no "official" way of doing it, but as I said ,there are often tricks. F.ex. how about setting it either to " " (a space bar), or ...erhm, alphaed text, though that rarely works |cffffffff|bla|r. That's all I can think off. With your bounty system, if everything else fails, you could ... if there are not too many units around - Create a trigger in-game for each unit that should affect the bounty, attach to it the event "UnitIsDamaged" with the unit in question. Then have them all tie to the same function, where you check if the damage being done is more than the current HP of the unit, then you give money (you can also wait 0.01 second for him to kill if you want to be asynchronous). But...considering that you don't really know jass that well, considering how you ask how to do everything we suggest you to do.... so this solution may be a bit tough for you, as it requires pretty smart setup, including KaTTaNa's SetHandleHandle function, and stuff.. And you must know that we residents in this forum don't have endless times on our hands. And we don't only have to help you find a solution, but also to explain it in-depth, including how every part of the code works... However, since i'm fairly bored right now, i'll take you through some of them. The filter is just what it says...a filter. It works the exactly same like Conditions on triggers, that is, it includes a function that uses "GetFilterUnit()" and returns a boolean. This boolean specifies wether if a unit enters a region, should the trigger be run. So if a unit of player 1's enters the region, then this filter gets run, it compares the owner of the entering unit with Player 10 (Player(9) is the same as Player 10). If the unit's owner is not equal to Player 10, it returns true, else, it returns false. So, now, if it returned true...it continues and runs the trigger. (which is the "ActionFunc") 7). Perhaps it's good to first find the natives. The natives are in a file called common.j in your war3.mpq. You can reach it by using a mpq program like WinMPQ. Inside them are ALL the function that the game gives us listed. Those are not the function that GUI uses. GUI uses another set of function that themselves "use" these function. The order natives have names like IssueOrderTargetingUnit or sumtin, look for them yourself. So, the best way to check the return value of a function is to do the following: set b = <FunctionName>(<Parameters>) Where you have to have defined b as a boolean at the top of your function (can be any name). Notice that it works almost the same way as you call a function, the only difference is that instead of writing call, you write: "set <var-name> = ". Then you can use "b" in a if statement to do what you want. like the following: if(b == true) then call KillUnit(MyUnit) endif 9) This is the function you need: function Unit2Int takes unit WhichUnit returns integer return WhichUnit return 0 endfunction This is WAY to deep a subject for me to want to explain it in depth one more time, I have explained this thing thoroughly likely a dozen times to dozens of people. So either just use it, or you can find threads about this thing if you search this forum. Cubasis |
| 04-20-2004, 06:42 PM | #9 | |
Quote:
"function RunMeAtInit takes nothing returns nothing call RegionAddRect(udg_death,gg_rct_Region_000) call RegionAddRect(udg_death,gg_rct_Region_001) call RegionAddRect(udg_death,gg_rct_Region_002) call RegionAddRect(udg_death,gg_rct_Region_003) call RegionAddRect(udg_death,gg_rct_Region_004) endfunction" does that just make a big region by adding all the rects to it? |
| 04-20-2004, 09:16 PM | #10 |
That is what it does. But note as someone already said, what the WE labels as region variables are not really regions but rects. |
| 04-20-2004, 09:29 PM | #11 | |
Quote:
the diff between a region and a rect (in terms of wc3) is...? |
| 04-20-2004, 10:29 PM | #12 |
Shape. Rects are square, and regions have no set shape. Also, regions don't have to be connected rects. |
| 04-20-2004, 11:12 PM | #13 |
If you need help with the a Class system send it my way im always ready for some coding and yes Class cache system is my brain child that Ai Andy and Weaaddar have trully made into a pice of coding art . :D |
| 04-21-2004, 02:03 AM | #14 | |
Quote:
we have a bunch of cards and each card has unique properties and different cards belong to different groups. fire group - fire card 1 - fire card 2 water group - water card 1 - water card 2 etc etc. ^_^ *remember you asked to help |
| 04-21-2004, 07:07 PM | #15 |
Basicly a Class is group of Hiden varables and methods That are linked to a single name . exaple of this in jass The Unit object ,Player object, ect. however blizzard did not alow us to create objects we have found a back door using game cache a card objcet could hold Current location of card Its Type Attack power / defence and methods for using the objects in code You can even Create Card object that can copy it self or set a card objcet to point to anthor card object instead of its self. if you give an exaple of what You want these cards can do i can work on class for you this weekend. |
