pass local into timer and return

Frozenwind

System maker
Reaction score
99
Any of you know a good tutorial about structs?
I can't find a lot about them....

World-Editor-Tutorials actually gives me none... Or I'm searching the wrong way?

frozenwind.
 

SFilip

Gone but not forgotten
Reaction score
634
> But they can be used to pass data to timers.
They can't unless you use a variable or a system for the actual passing. And using either is of those is possible regardless of having structs defined or not.
 

Cohadar

master of fugue
Reaction score
209
I did not say you need them, I just said it was possible with them.
 

SFilip

Gone but not forgotten
Reaction score
634
And I never said it's impossible. :p

> a good tutorial about structs?
Read Vexorian's manual:
hilton.vs.oiccam.com/vexorian/jasshelpermanual.html
 

Frozenwind

System maker
Reaction score
99
I've readen the tutorial for the biggest part, but a small question about structs:

Is it possible to pass a value via a timer with it o_O?
By now it seems like it's some "basic" value which you use into your function?

frozenwind.
 

Cohadar

master of fugue
Reaction score
209
So 2 options: (maybe 3)
A. Structs
B.Table/Handle var to count number of times the timer expires
C. (maybe) let the trigger call itsself using a timer (only possible if I can pass value in timer, but I'd need A or B for that, right?)[/list]

Solution is hidden in your own words.
Some things simply manifest themselves into existence when needed.
Pure Magic :)
 

SFilip

Gone but not forgotten
Reaction score
634
No, forget C.
Forget A as well. I repeat, structs aren't an attachment system, in fact they weren't even made for attaching, it's just one of possible uses.
Find a system that can attach a single integer to a timer. Since structs are integers you can attach a struct to it. That's all there is to it.
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Cohadar is making a lot of jokes about his attachment system, ABC in case you're wondering.
 

Frozenwind

System maker
Reaction score
99
Yeah, I've been looking fot attachment system.

But this night I got some (I think) good idea.
BUT It's only possible if these conditions return true:

  • If you run such a JASS timer, and put it to 0.03 seconds, will it take EXACTLY 0.03 seconds, ALWAYS?
  • Same as A, but then with 3 seconds?

Cos in that case I can run a global integer which I increase every time I gotta pass it.
I'd use gamecache then: I store under the label named integer_var the value I gotta pass 0.03 seconds later.

You guys think that is possible?

frozenwind.
 

Frozenwind

System maker
Reaction score
99
k,
Anyway, I'm not trying to do it with gamecache, like this:

(This is pointly, dun know wether you guys understand it, but I do in combination with my memory:p)

  • store all values under label int_var1 and do int_var1 +1
  • call first time with int_var2
  • store int_var2 under int_var1 and do int_var1 +1
  • call rest of the times the stored int_var2 with the new int_var2, like that you get the old data.
  • take all values with int_var2_old
***note: I let my function call hisself using an one-hit timer, and if a certain stored value gets greather than (for example) 50, then I won't let it recall hisself anymore***

I'm about 90% sure that it will work, since Cohadar says the timers take exactly 0.03seconds, so the int_var's wont bug.

frozenwind.
 

Cohadar

master of fugue
Reaction score
209
Ok this is not funny any more.

Noob-friendly Attachment system -----> ABC

Download the demo map and see how it is done ffs.

If there is something particularly hard for you to understand there just ask.
If you need me to write you an example ask politely.

Now stop wasting your time with gamecache and other silly stuff
that take 5 days to learn, run slow and create nondeterministic bugs.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top