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.

      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