| 12-19-2005, 12:25 PM | #1 |
Which value is the maximum value possible to have as a unit custom value? |
| 12-19-2005, 12:52 PM | #2 |
Generaly the maxium integer value. I thinks its 2147483647, but im not sure.... |
| 12-19-2005, 01:14 PM | #3 |
I guess what you are asking for the the maximum integer value. I did this little test: Code:
function test takes nothing returns nothing
loop
set udg_i = udg_i + 1
endloop
endfunction
function Test1 takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 8000
call ExecuteFunc("test")
set i = i + 1
endloop
endfunctionCode:
asdf
Events
Player - Player 1 (Red) skips a cinematic sequence
Conditions
Actions
Game - Display to (All players) the text: (String(i))
Set i = (i + 1)
Game - Display to (All players) the text: (String(i))So I tried powers of 2 that seemed logical and found out the the maximum integer number is 2147483647, which is 2^31 - 1. After this is will become negative. So yes, zoxc is right (I started this stuff b4 he answered -.-) And I know my method at first was stupid but I thought it would be somewhat lower then this... |
| 12-19-2005, 01:17 PM | #4 |
I just checked Delphi help file :P Thought it applied to all programming languages or something is wrong with Borland. |
| 12-19-2005, 01:54 PM | #5 |
By the way, what language is wc3 and JASS made with? What is it based on? |
| 12-19-2005, 01:59 PM | #6 |
Thats a 32 bit integer then Does anyone know if its dependent on individual machine? I mean, will, on some very very old comp, it be 16 bit integer? Or a comp that long simply won't be able to run wc3? The reason i want to know is that that's effectively an open space to store 32 flags about unit's current state. Which i really want to use in my new map project. |
| 12-19-2005, 03:15 PM | #7 |
Its made in C++ Using DirectX SDK I belive. |
| 12-19-2005, 04:25 PM | #8 |
I think it could be C actually, blizzard never talks about that though |
| 12-19-2005, 05:05 PM | #9 | ||
I could have told ya without testing that it's a signed 32-bit integer. ![]() Quote:
The bottom line is that what you want to do will work on any machine that runs WC3 once its properly implemented. Imagine what would happen, if WC3 worked machine-dependant. Happy desync I'd say ![]() Quote:
@Vexorian: I'd rather say C++. Nobody writes games in C those days. Though you never know, given how f*cked up JASS is ![]() |
| 12-19-2005, 05:34 PM | #10 |
I looked at the read me html that comes with the game, somewhere it says something like (C++ rules!!) so I guess that's what they made it with. I'm not sure at all though. |
| 12-19-2005, 06:48 PM | #11 |
If it had at least a bit more from C... I would be so thankful! |
| 12-19-2005, 06:52 PM | #12 |
Hello looks who's here! Welcome to Wc3c N00byStance Wc3 made in JASS ![]() |
| 12-19-2005, 07:28 PM | #13 |
Wc3c was made in JASS well the whole rules for melee stuff I said it could be C cause JASS is not too object oriented the way JASS works sounds as the dummy object orientedness you end up using when you make stuff in C so it could be that JASS is like that because its developer's liked C style more. But I don't know it could be C++ too |
| 12-19-2005, 10:11 PM | #14 | |
Quote:
Or better: They didn't want to do it better. It was way better than the SC-Trigger Editor so why bother making it perfect. It was designed for implementing the features Blizzard needed. Not really anything more. Thats why we tap into so many stupid limitations. |
| 12-19-2005, 10:50 PM | #15 |
Stupid limitations like what... I have found no real "stupid" limitations. Only "understandable" limitations like.. not being able to make it into a different gametype without ruining the game for bnet play (lag ownz). For all other limitations you just have to be a little more innovative, which is good for the brain every now and then. Wc3 has the best editor I have ever seen and I wonder what will top it. I dont call it lazyness they didnt make jass a full scripting language, I thank them for making us able to mod wc3. |
