System Spawn Units at Point Over Time (SUPOT)

Flare

Stops copies me!
Reaction score
662
i had alreayd relayed all that to him after he posted over im

Ah, I see you mentioned the .destroy part, but I don't see (or amn't fully understanding) where you mentioned anything about
// local <struct name> <local name> = <struct name>.create()
// set <local name> = SUPOT_StartSpawn(integer UnitTypeID, integer NumberOfUnits, real TimePerSpawn

(I'll be able to test those things I mentioned in the next few hours once I get home)
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
Lets say you have a footies map. You can just spawn everything with one function call.
I'm having issues with my latest version because it's returning a struct and it isn't assigning properly.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
Yeah, I'll hit you up on MSN so we can try to fix it.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
Updated to 4.5
Tis cool n all nao.

Edit
4.6
Safeties added
 

Flare

Stops copies me!
Reaction score
662
Your ChangePlayer safeties are incomplete - you haven't made anything that stops Player (-1) or Player (16) [etc] being used

Also, the addition of a LastStarted variable may be useful if, say, someone wanted to stop the last started spawn from another trigger (but they may not have access to the instance variable because it was a local and/or the other trigger is located in another scope/library)
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
Should I do like
if player != Player(0) -- Player(15) or player = null then
 

Flare

Stops copies me!
Reaction score
662
JASS:
if GetPlayerId (whichPlayer) &lt; 0 or GetPlayerId (whichPlayer) &gt; 15 or whichPlayer == null then
//I assume you&#039;re using a player type variable and not an integer for handling the players?
//Also, I&#039;m not sure if GetPlayerId actually exists, it could be just PlayerId, not really sure <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />
  call StopTryingToBreakThingsPlease ()
  return
endif
 

Artificial

Without Intelligence
Reaction score
326
> anything that stops Player (-1) or Player (16)
Umm... He can't? The game will crash immediately when you call Player() with a bad argument whether it is for this system or not... :p
And making it take the player as an integer just to prevent this would be stupid, as it is really the user's job to not try to get Player(1337).
 

Flare

Stops copies me!
Reaction score
662
> anything that stops Player (-1) or Player (16)
Umm... He can't? The game will crash immediately when you call Player() with a bad argument whether it is for this system or not... :p
And making it take the player as an integer just to prevent this would be stupid, as it is really the user's job to not try to get Player(1337).

Good point :p Seems it's either use an integer, or hope that people won't be stupid about things :p
 
Reaction score
333
I don't think it is necessary. Invalid arguments for Player crash the game, so the chance of one ever been tested for successfully by GetPlayerId is pretty slim. I don't think all those null compares in the System are necessary either. I don't know why reals and integers are being compared to null at all, because it is basically the same as comparing to 0.

It is also worth noting that the correct spelling is "purpose", and that this system provides no way of handling the units after they have been spawned.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
I've updated to 4.8.

@TheDamien
This spawns the units, I'd think you would spawn them into a region to do something.
 
Reaction score
333
I've updated to 4.8.

@TheDamien
This spawns the units, I'd think you would spawn them into a region to do something.

In most cases, people will want to do something with the units so they will need to set up a region, a trigger and a condition to make sure that only spawned units trigger off the actions. It would be pretty easy to allow the user to provide a function to run on the spawned units, and also to provide functions to grab the id of the triggering spawner, the unit spawned, etc.

EDIT:

JASS:
toggle != true or toggle != false


Also known as:

JASS:
false
 

emjlr3

Change can be a good thing
Reaction score
395
there is still one fundamental flaw with this system

your struct is private, thus, your returned integer is of no value to the user

also, who the hell is emjir3?
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
I'll make the struct open.

Your MSN says emjir3.


Edit: 5.0 Released
 

Flare

Stops copies me!
Reaction score
662
your struct is private, thus, your returned integer is of no value to the user
That's what the modification functions are for - I did pretty much the same thing with my TimedLightning system (I left out the cast to struct, must add that sometime), and it works. If the struct is made available to people, it's just begging for someone to break things with negative/invalud inputs

also, who the hell is emjir3?
Ha, I was right! In your face kc :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      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