System Fade System

Reaction score
456
>call dat.callback.execute(dat.whichUnit)
But if the callback function doesn't have "takes unit"?
 

Cohadar

master of fugue
Reaction score
209
User cannot pass function to a system unless it has unit parameter.
That is what interface is for, it makes sure users obey rules.

It works like I said, just read some more to understand the process.

EDIT:

In case you did not notice your system is not for GUI users (nor should it be)
it is for (moderately good) jass users who also use NewGen.

And such people tend to know how to use interfaces..
 
Reaction score
456
>And such people tend to know how to use interfaces..
Excluding me x)

I make it work other way around. Probably beta of new version coming today :p
 

Cohadar

master of fugue
Reaction score
209
Well you are still young and green :D
you have a lot of time to learn...
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>Well you are still young and green
you have a lot of time to learn...

???!!!
So that you are old and yellow?

Well, this system is awesome before, currently are useless...BUG-ed
 

Cohadar

master of fugue
Reaction score
209
Überplayer is having a hard time here,
he just started learning jass, and this system requires quite of knowledge to be completed successfully.

I helped all I can, but I guess it is not enough,
just give him some time to collect a bit more experience and he will manage it.

And I am old and orange stupid.
 
Reaction score
456
>Überplayer is having a hard time here, he just started learning jass
Not exactly.. I just started to learn vJass... :p

EDIT://Still having problems with the GetFadedUnit() thing.. Takes much time =)

EDIT2://I really have no idea how to do GetFadedUnit() function.. ;/
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
JASS:
function GetFadedUnit takes nothing returns nothing
     return globalunitvariable
endfunction

//...
                if (dat.<something-that-can-be-executed> != null) then
                    set globalunitvariable = dat.whichUnit
                    call <the-right-execute-function>(dat.<something-that-can-be-executed>)
                endif

//...
function FadeUnit takes unit whichUnit, real duration, real minimumFade, <something-that-can-be-executed> callback returns nothing


For example,
<something-that-can-be-executed>= trigger (with condition)
<the-right-execute-function> = TriggerEvaluate
 
Reaction score
456
Thanks.. But if the fade system is ran in many triggers at the same time.. wouldn't it screw up the:

return globalunitvariable
 

Cohadar

master of fugue
Reaction score
209
If you use TriggerExecute - yes
If you use TriggerEvaluate - no.

The trick is to put everything into Condition and to remove Actions from trigger.

It's a bit of advanced jassing...

Also note that vJass function interfaces are implemented by passing globals + TriggerEvaluate
So if you use function interfaces (as was already suggested to you) NewGen will do all the dirty job for you and it will be safe from screw-ups
 
Reaction score
456
>So if you use function interfaces (as was already suggested to you) NewGen will do all the dirty job for you and it will be safe from screw-ups
Yes, I'm trying to use them :), thanks for telling me they work. But I still have to get a bit better with them.. I wouldn't like to attach another bugged map here..
 
Reaction score
456
Translate what? This is English, for you to know..Joke..

You shouldn't use the system now.. It's not for use currently as I have problems making a working version of it.
 
Reaction score
456
System updated!

It works properly now.. but I still need some kind persons to test :p.. as something unexpected might occur.
 
Reaction score
456
Okay so.. Cohadar helped me out with this system (thanks :)), and wrote it to use ABC.

But the deal is.. I don't understand a shit of the code now.. :p.. It'd be stupid if I just posted here a code, without knowing what it exactly does.

So the question is.. should I really update the system to newest version which uses ABC?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
Okay so.. Cohadar helped me out with this system (thanks :)), and wrote it to use ABC.

But the deal is.. I don't understand a shit of the code now.. :p.. It'd be stupid if I just posted here a code, without knowing what it exactly does.

So the question is.. should I really update the system to newest version which uses ABC?
nop....
what's the point if you don't understand anything written in there?
it would be totally useless to post something like that it would be better if you learn how to use ABC and understand the whole trigger first
 

Cohadar

master of fugue
Reaction score
209
nop....
what's the point if you don't understand anything written in there?
it would be totally useless to post something like that it would be better if you learn how to use ABC and understand the whole trigger first

I must agree with this.
You should definitely learn how to use ABC, at least enough to understand that code.

Now the greatest modification I did was not simply replacing old attaching with ABC (even ~Gals~ could do that :rolleyes: )

It is the GetFadedUnit() function.
Creating a custom event response functions is a bit advanced coding.

On the other hand people don't have to understand how systems are working inside to be able to use them, so let me ask you:

Did you try using this? Did it feel ok?
 
Reaction score
456
It feels.. well.. much better than mine =).

I begin to learn ABC's now.. I've been already trying, but I haven't had enough time (actually, sometimes I do have time) and courage.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top