You're currently viewing our forum as a guest. Register now or login to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple and fast. Register HERE! If you're already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| Preloading Models | |
|---|---|
| Topic Started: Sep 9 2008, 02:50 AM (731 Views) | |
| 0chspelar | Sep 9 2008, 02:50 AM Post #1 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I was trying to figure out how to preload the models in my map before the init, cause zombie spawn lags sometimes, and general spawn and zombie mutation lags sometimes http://www.hiveworkshop.com/forums/f279/game-caches-6273/ I found a tutorial on game cache, do I just make a gamecache and store the 3 units? Zombie: O000:Otch Mutated Zombie: O007:Otch General: O006:Otch |
![]() |
|
| BDSM | Sep 9 2008, 01:59 PM Post #2 |
|
Sadistic Bastard
![]() ![]() ![]() ![]() ![]() ![]()
|
Place any unit's you use on map during initialization, along with spells you plan to use later. OR Load each model you plan to use with:
|
![]() |
|
| AwaKening | Sep 9 2008, 04:35 PM Post #3 |
|
How do ya like me now
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Now you know why Dota lags at the beginning .I use the method BDSM stated. All my heros are placed in a corner of the map and then removed via trigger in the Map Init; otherwise, you get a second of lag everytime someone picks a new hero that hasn't been picked yet. I sacrifice a bit of load time, but I'd rather have to wait there instead of in the game. |
|
Women, learn to work the toilet seat. You're a big girl. If it's up, put it down. We need it up, you need it down. You don't hear us complaining about you leaving it down. | |
![]() |
|
| 0chspelar | Sep 9 2008, 10:24 PM Post #4 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
oh, so I load them on the map and then destroy unit? when i put them on the map who do i assign the units to? or is there a neutral or something.[redit][/redit] Edited by 0chspelar, Sep 9 2008, 10:43 PM.
|
![]() |
|
| AwaKening | Sep 10 2008, 08:23 AM Post #5 |
|
How do ya like me now
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Player Neautral Passive (Player 15) You can either make a trigger to create and remove them at start, or just preplace them so you only have to trigger the remove. The second method seems to load faster in my testing. |
|
Women, learn to work the toilet seat. You're a big girl. If it's up, put it down. We need it up, you need it down. You don't hear us complaining about you leaving it down. | |
![]() |
|
| BDSM | Sep 10 2008, 09:59 AM Post #6 |
|
Sadistic Bastard
![]() ![]() ![]() ![]() ![]() ![]()
|
Pre-placed units simply invoke the use of the CreateUnit native, albeit through a few chained functions calls. Also, since pre-placed units are declared before GUI triggers, you can easily just remove them with no worries. Pre-placed yields zero gain as far as loading time when compared to calling it yourself during map initialization. However, it does have one benefit: placing units exactly where you want to with greater ease. As far as which player to assign the units to, it really doesn't matter so long as you're removing them in map initialization. No one would be the wiser. However, I would say it's good taste to give them to a "neutral" (as in not on any sides) player; for most maps this will be Player(15). |
![]() |
|
| 0chspelar | Sep 18 2008, 11:30 AM Post #7 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
yea i tried to pre place but I can't find the units after clicking nuetral passive. it only gives me neutral and naga units, do i have to copy them in the obj editor and move them to neutral? |
![]() |
|
| AwaKening | Sep 18 2008, 03:59 PM Post #8 |
|
How do ya like me now
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No. I can't remember without looking at the map editor, but there is a way to do it. You could just preplace them as red, and then change to player neautral passive afterwards by double clicking the unit. |
|
Women, learn to work the toilet seat. You're a big girl. If it's up, put it down. We need it up, you need it down. You don't hear us complaining about you leaving it down. | |
![]() |
|
| 0chspelar | Sep 18 2008, 04:06 PM Post #9 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
oh ok thanks, it worked, now i just need to make a trigger to destroy/ remove the units i'm guessing its something like
looks something like this? did it in gui and then switched to custom text, it saves, i guess i'll test it out. [redit][/redit] Edited by 0chspelar, Sep 18 2008, 04:20 PM.
|
![]() |
|
| 0chspelar | Sep 18 2008, 04:28 PM Post #10 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
bah, i tested it, it didn't remove them. I set it to map init as the event, maybe i should have it wait .01 and then do it? instead of map init? either that or i have to kill/ destroy unit or something. though remove is what i want right? Edited by 0chspelar, Sep 18 2008, 04:30 PM.
|
![]() |
|
| AwaKening | Sep 19 2008, 11:45 AM Post #11 |
|
How do ya like me now
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well #1, you need to be using GetEnumUnit() instead of GetFilterUnit(). Enum=pickedunit #2, you will be removing anything on your map that is player 15. You probably don't want that. You need to make conditions to pick only certain types of units to remove, or put them in a region and select all in region. You could even just trigger the whole thing instead of preplacing them, won't make too much difference #3, Your trigger will leak; although it's only run once, so not a huge deal, but get used to fixing any leak ![]() Example: local group g local boolexpr bx set g=CreateGroup set bx = Condition(function YourConditionsName) call GroupEnumUnitsOfPlayer(g, Player(15), bx) call ForGroup(g, function Trig_preload_Func001A) call DestroyGroup(g) set g=null call DestroyBoolExpr(bx) set bx=null |
|
Women, learn to work the toilet seat. You're a big girl. If it's up, put it down. We need it up, you need it down. You don't hear us complaining about you leaving it down. | |
![]() |
|
| 0chspelar | Sep 19 2008, 01:06 PM Post #12 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
nothing is 15 except the 3 models I set for preloading, so its really ok, to remove all player 15, its not gonna mess up anything ah, yea so i have to null it to stop leaking? |
![]() |
|
| 0chspelar | Sep 22 2008, 06:27 PM Post #13 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
by conditions name, you mean my trigger name? |
![]() |
|
| AwaKening | Sep 22 2008, 10:21 PM Post #14 |
|
How do ya like me now
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
NO You have to make the conditon function within the trigger. Example of a condition within your trigger. Then you link your boolexpr to it. set bx=Condition(function blabla_bool)
|
|
Women, learn to work the toilet seat. You're a big girl. If it's up, put it down. We need it up, you need it down. You don't hear us complaining about you leaving it down. | |
![]() |
|
| 0chspelar | Sep 23 2008, 12:07 PM Post #15 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
ah, so i have to add a boolean in there. along with all the other stuff i have, and add the nulls, |
![]() |
|
| 0chspelar | Sep 23 2008, 01:16 PM Post #16 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
is that bool in the actions? |
![]() |
|
| 0chspelar | Sep 23 2008, 01:22 PM Post #17 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
all the info is there, I just need to organize it correctly, lookin at my old triggers. :edit : Ok i rearranged it, I only get 1 error Expected '(' at set g=CreateGroup so i'll look at more of the old triggers for ideas. 2nd edit, dur, easy enough, () It saves, now to test it. Edited by 0chspelar, Sep 23 2008, 02:26 PM.
|
![]() |
|
| AwaKening | Sep 23 2008, 01:55 PM Post #18 |
|
How do ya like me now
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You got the idea, just replace those shitty gui conversions with the code i gave you. I think you can do this alone. You have everything you need, just arrange it. |
|
Women, learn to work the toilet seat. You're a big girl. If it's up, put it down. We need it up, you need it down. You don't hear us complaining about you leaving it down. | |
![]() |
|
| 0chspelar | Sep 23 2008, 03:24 PM Post #19 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yea it works, but i forgot I use player 15 neutral passive for the graveyards and shops, so it took those out too. so I need to fix that, I turned the trigger off for now. I could make the pre placed player neutral aggressive or something. instead of redoing the whole trigger, i dunno what do you think. Also found another bug for a hero trigger but i'll post it in that thread. |
![]() |
|
| 0chspelar | Sep 23 2008, 07:21 PM Post #20 |
|
Grammar Nazi
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
all 3 units are hero's i believe so i could GetEnumUnit(HERO) for player 15 or do it by each unitid Zombie: O000:Otch Mutated Zombie: O007:Otch General: O006:Otch |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Mapping · Next Topic » |
- Pages:
- 1
- 2





![]](http://209.85.122.87/static/1/pip_r.png)



.
5:21 AM Jul 30