• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] A few struct questions.

Status
Not open for further replies.
Level 12
Joined
Dec 10, 2008
Messages
850
Ok, so I'm working on a spell, and I need it to attach a struct to any unit with this ability, but I don't really know how you "Attach" a struct to anything.

I also need to know if its possible to get a strut private struct attached to any unit to accsess and change its variables.

I also need to know if theres any way I can time how long a integer stays at a number greater then 0, and if that time experies, reset it to 0.

Thanks to whomever awsers these questions, but please don't suggest using a hastable
 
Level 11
Joined
Apr 6, 2008
Messages
760
Ok, so I'm working on a spell, and I need it to attach a struct to any unit with this ability, but I don't really know how you "Attach" a struct to anything.

One word Tables. Quite easy to use and fast now thx to hashtables

I also need to know if its possible to get a strut private struct attached to any unit to accsess and change its variables.

why private and not public? to access a public struct its PREFIX_STRUCTNAME. Prefix is the name of the scope/library
I also need to know if theres any way I can time how long a integer stays at a number greater then 0, and if that time experies, reset it to 0.

timer?

Thanks to whomever awsers these questions, but please don't suggest using a hastable

Hash is the shit :p

Feel free to ask for more
 
Level 12
Joined
Dec 10, 2008
Messages
850
Thanks, I'll be sure to get Tables.

I need a private struct for each unit with the ability since it detects every time a unit attacks, and if it kills it, gives it a temporary damage increase for a few seconds, and then resets it.
 
Status
Not open for further replies.
Top