[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > JASS Resources


JASS Resources Find JASS code snippets and functions here or write your own and post it on the Submissions sub-forum.

Reply
 
Thread Tools
Old 06-12-2012, 04:18 PM   #46 (permalink)
Registered User razor21
Its time 2 even da scales
 
razor21's Avatar
 
Join Date: Aug 2009
Posts: 1,097
razor21 has a spectacular aura about (136)razor21 has a spectacular aura about (136)razor21 has a spectacular aura about (136)razor21 has a spectacular aura about (136)
Some kind of a struct? whats that, i dont know jass xD

so how do we use this?
__________________
razor21 is offline   Reply With Quote
Old 06-12-2012, 04:54 PM   #47 (permalink)
Registered User Zwiebelchen
Dance, my puppets, dance!
 
Join Date: Sep 2009
Posts: 2,263
Zwiebelchen is just really nice (414)Zwiebelchen is just really nice (414)Zwiebelchen is just really nice (414)Zwiebelchen is just really nice (414)Zwiebelchen is just really nice (414)
Quote:
Originally Posted by watermelon_1234 View Post
That method doesn't seem like a good idea in terms of ease.
It requires more work in general since the user has to know how to edit models. It's also a hassle if he wants to play different multiple animations from one model because he would have to import one model for each animation he wants to use. The method would also force him to edit and import standard models again that have a specific animation he wants to play.
Again, when would you ever need to run a specific animation of an sfx? special effect models are made in a way that you don't ever need that. The only exception is when you want to use unit model as an sfx. But in this case you can just use dummy units in the first place.

It simply makes no sense to have a system that uses dummy units instead of special effects right from the start. You should avoid using dummyunits whenever you can. Creating and destroying a special effects is a hundred times faster than creating or manipulating a dummy unit. Even moving an dummy unit alone takes much more speed than just using a special effect.
If you need to access a certain animation directly (which should almost never be the case in standard situations), you can always use a dummy tailor-made for this specific situation. I don't really see a reason why you would need a system for that.
Zwiebelchen is offline   Reply With Quote
Old 06-13-2012, 01:35 PM   #48 (permalink)
Registered User mckill2009
SSJ99999 Pinoy!
 
mckill2009's Avatar
 
Join Date: Mar 2009
Posts: 4,372
mckill2009 is a splendid one to behold (836)mckill2009 is a splendid one to behold (836)mckill2009 is a splendid one to behold (836)mckill2009 is a splendid one to behold (836)
Quote:
Originally Posted by razor21 View Post
Some kind of a struct? whats that, i dont know jass xD

so how do we use this?
it means like this...
Jass:
struct test
    //! runtextmacro DummyReuser("'A000'")
endstruct
'A000' is a raw code of the dummy by pressing CTRL+D in the object editor...

coz it will compile like this...
Jass:
function s__test_get takes player owner,real x,real y,real facing returns unit
        if s__test_dr_count == 0 then
            return CreateUnit(owner, 'A000', x, y, facing)
        endif
        set s__test_dr_count=s__test_dr_count - 1 // The stack is zero-based
        return DummyReuser_Get(s__test_dr_stack[s__test_dr_count] , owner , x , y , facing)
    endfunction

    function s__test_release takes unit u returns nothing
        if DummyReuser_Store(u , 'A000' , s__test_dr_count) then
            set s__test_dr_stack[s__test_dr_count]=u
            set s__test_dr_count=s__test_dr_count + 1
        endif
    endfunction

and called/used like this;
local unit u = test.get(GetTriggerPlayer(), 0, 0, 0)
__________________
My Resources:
My Maps
My Systems/Spells

Your ideas tend to result in unnecessary violence so shut the F*** up!
mckill2009 is offline   Reply With Quote
Old 06-13-2012, 02:57 PM   #49 (permalink)
Registered User watermelon_1234
User
 
watermelon_1234's Avatar
 
Join Date: Nov 2007
Posts: 1,055
watermelon_1234 is a glorious beacon of light (502)watermelon_1234 is a glorious beacon of light (502)watermelon_1234 is a glorious beacon of light (502)watermelon_1234 is a glorious beacon of light (502)
@Zwiebelchen: I should have made the script's description more clear.

This script is mainly aimed for recycling dummy units with models that can play multiple animations, which would mostly be unit models. Those dummy units could be thought of as special effects since they're only for visual purposes.
watermelon_1234 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 10:17 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle