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
590
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
590
Yeah, I'll hit you up on MSN so we can try to fix it.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
590
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
590
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
590
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
590
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.
  • Ghan Ghan:
    Howdy
  • 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
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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