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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top