Page 1 of 1

Sprite and Hallucination Help

Posted: Mon Aug 08, 2011 8:11 pm
by sneakylikeaninja
After finding this website I was thoroughly intrigued by all the magical things you can do within a Starcraft map and so I went and got myself a SCMDraft 2 and now I can cough up a pretty decent map, but I still want to know about half of the other stuff that came with the SCMDraft that I've never used before. One of those things is the sprite button. I've seen maps with units that have that have strange colours in their wire frame, like purple and blue and grey and sometimes even a piece missing. I opened that map and found out that the unit I was looking at wasn't a unit at all, but some weird door sprite that somehow became a unit. How on earth did that happen? Also I found a sprite that was a unit's dying blood splatter that somehow was placed in the map. I opened the IScript tester and typed in the sprite number and found the same blood splatter, but how did the maker place that as a sprite when it isn't in the sprite list? It isn't as vital to know this as it's just for effect but I'd like to know anyways, just for peace of mind.

Hallucinations: what exactly are they?
I'm currently attempting to make a map that involves hallucinations being killed and replaced with normal units of the same type. I did some tests (more like screwed around) and I've found that hallucinations can have locations centered on them as a normal unit would, I think, but cannot be removed or killed by any normal trigger unless there is a real unit within the same location standing off to the left of the hallucination to die after it does. Ultimately, is it possible. I just need to know that first and I'll do whatever it takes to make it possible.

Thank you for reading.

Re: Sprite and Hallucination Help

Posted: Wed Aug 10, 2011 9:21 pm
by AngelSpirit
What map was it? If you can upload it somewhere and link to it, I can dissect it for you and tell you how all that stuff is done. Without a closer look though, I'm not sure exactly what you're trying to say, since AFAIK what you're describing shouldn't be possible.

As to hallucinations:
The most basic property of hallucinations is that they can NOT be detected by trigger conditions, but CAN be affected by trigger actions. This probably explains the symptoms you're experiencing.

Re: Sprite and Hallucination Help

Posted: Thu Aug 11, 2011 4:47 pm
by sneakylikeaninja
The name of the map is called Mars Survive 3.1 and I'm too lazy to check the creator's name. I've put the map in here as an attachment for AngleSpririt but if anybody else wants it then by all means take it.
AngelSpirit wrote:Without a closer look though, I'm not sure exactly what you're trying to say, since AFAIK what you're describing shouldn't be possible.
Pardon me for describing it in an impossible way, but to make up for it, here's the map so you can give me the details. :explain:
AngelSpirit wrote:The most basic property of hallucinations is that they can NOT be detected by trigger conditions, but CAN be affected by trigger actions.
That explains everything! I don't know why I didn't catch that before. Thanks a lot for all the help.

Re: Sprite and Hallucination Help

Posted: Fri Aug 12, 2011 5:47 pm
by AngelSpirit
Wow, the guy who made that map really knew what he was doing.

That aside, I'll go over each of the things you described.

The miscolored wireframes:
These are caused by increasing a unit's current HP beyond its max. Example, a marine with 60/50 hp will have a miscolored wireframe. There are two ways to do this.
In the SCMDraft unit properties window, you've probably noticed before that there's a little box that reads '0' beside a unit's HP box. If you change this box to anything besides 0, then two things will happen:
- The unit's wireframe will get messed up and display weird colors.*
- The unit will always spawn with one HP above its maximum. For example, if you have a Terran Marine with 100 max HP, but you set that little box beside the HP box to 1, then the Marine will have 101/100 HP.
*IMPORTANT: The unit's wireframe will ONLY change if the unit's max HP is less than 9.
(Just a note, in places where it looks like parts of the wireframe are missing, they're actually not, they're just colored black)

Okay, that's one way to do it. The other way requires knowledge of unit sprites.

Now, you know what a sprite is, I presume. There are two different types of sprites: pure sprites and unit sprites.
Pure sprites are, simply put, any sprite that is not a unit sprite. This includes all the unused/unknown sprites listed in SCMDraft, as well as the sprites listed under "Sprites->Units".
Unit sprites are all sprites under the SCMDraft list "Sprites->Unit Sprites". Now, if you go into an editor and place a unit sprite and a pure sprite, you'll notice no immediate difference between the two. The only difference is ingame: in the game, a pure sprite will not do anything, and just sit there. Pure sprites act as, quite literally, sprites; you can see them, but they don't do anything or have any effect on the game whatsoever(besides possible crashes). They are unselectable, purely visual elements.
Unit sprites, on the other hand, will act *exactly* like normal units. There is one important difference though: When the map starts, unit sprites will always start with their default HP, regardless of their editor-set maximum.

That might have sounded confusing, so allow me to clarify:
- Let's say that, in the unit properties window, you change the max HP of Terran Marines from 40 to 50.
- When the map starts, any Terran Marine unit sprites that are placed on your map will have 40 HP, even though you set their max to 50. They will always have 40 HP, regardless of what you set their max to.
- This allows you to have current HP values that are larger than maximum HP values. Take the example above, but instead of setting the max to 50 HP, let's say we set it to 10.
- Now when the map starts, Terran Marine unit sprites will still have 40 HP. But their max is 10, so they'll have 40/10 HP. Now, because this is higher than the maximum, the Terran Marine unit sprites will have miscolored wireframes.

Now, you reason they don't appear as proper unit sprites in SCMDraft is most likely because you're using an outdated version that doesn't support unit sprites properly. The "official" version on Stormcoast Fortress is not the latest version.
Link to latest version: http://www.staredit.net/topic/8307/
The latest version of SCMDraft has more bugs and is less stable, but also has many (many!) more features, so IMO it's worth the update.

Okay, whew! That must have been a lot to take in. If you need clarification on anything, just ask, and I'll get back to you as soon as possible!


EDIT: And one more thing:
AngleSpirit
It's Angel, not Angle. :P

Re: Sprite and Hallucination Help

Posted: Sat Aug 13, 2011 12:36 pm
by sneakylikeaninja
AngelSpirit wrote:It's Angel, not Angle.
:o I'm really sorry about that.

Hey I get it! Thanks a bundle! I do have one last question though and it's about those illusive hallucinations. Would it be possible to mod the map or something to get the conditions to apply to hallucinations. Although I said I got it, I did a few more tests and it didn't work out so well...

Re: Sprite and Hallucination Help

Posted: Sat Aug 13, 2011 1:00 pm
by AngelSpirit
sneakylikeaninja wrote::o I'm really sorry about that.
Don't worry about it. :P

Conditions won't affect hallucinations, period. Although with advanced modding (specifically, plugins) you could probably hack the trigger code to allow hallucinations, it really wouldn't be worth the (huge amount of) work and effort to get this working.

Simply put, it can't be done.