Get EUD Editor and EUD Editor Translation from the first post in this thread:
http://www.staredit.net/topic/17529/This is EUD Editor V1, which supports "view triggers", allowing you to put EUD triggers into scmdraft directly, so you can edit the map afterwards (unlike EUD Editor v2, which does not yet support this functionality, but is otherwise more powerful and easier to use).
Now the theory behind all of this is that we are going to create Scanner Sweep units. Scanner sweep is a slightly weird spell, in that the way that it works is that casting scanner sweep actually creates an invisible unit on the playing field, which persists for a short period of time, providing vision and detection for the casting player, and crucially during this period of time it creates a sequence of Scanner Sweep Hit graphical effects on the field in a circular pattern - the familiar blue sparkles from scanner sweep. The scanner sweep unit is then removed and the player eventually loses vision of the casting spot.
The thing that creates the blue sparkle graphics is the iscript tied to the scanner sweep unit; so you could actually give this iscript to other units with some EUD editing if you wanted, but for our purposes it's easiest just to manipulate the scanner sweep unit itself, particularly as it won't be being used by any other triggers in-game since normally they won't do anything if EUD editing is not used.
How to do it:
1. In EUD Editor, on the DatEdit + Unit + Default tab (default, initial selection), got to unit id 033, Scanner Sweep.
2. Click on the Staredit sub-tab
3. Check the box for "List units & palette". This is the only staredit flag that is of any use/interest at all - clicking this will allow us to create Scanner Sweep unit via the Create Unit trigger action. None of the other flags do anything useful in-game; they control how Staredit works (which by default reads the unit.dat file to populate it's menus etc).
4. Now click on the DatEdit + Images tab.
5. Go to entry 474, which is Flames1 Type3 (Large). This step is just to identify what flame image you want to create. There are other flames you can try, and things like zerg building blood and spell effects like stasis, feedback, irradiate, generic explosions or weapon effects etc. Unfortunately you can't get access to unit death animations (the critter deaths would be nice to access) because those graphics are buried deep inside the unit graphic files, and we don't have the ability to edit iscript via EUDs at present, so we can't access them.
6. Now click on the DatEdit + Sprite tab.
7. Go to entry 380, Scanner Sweep Hit
8. In the properties of this tab, there is a box called Images with the value 546 in it. Replace this value with 474.
9. Now click the Inject EUD menu and select View Triggers.
10. In the new window that pops up, click "Use SetTo" in the bottom left.
Now you have the triggers you need to copy into scmdraft to set up the fire graphics for scanner sweep. Note that if any player uses scanner sweep in the game when these EUDs are set (if you don't set the sprite back to its default value of 546) will get a ring of permanent flames.
If you have the latest version of scmdraft, in classic trigedit you can create an action for EUD Modify Memory. Click on the blue Address field, and that's where the initial hex value (0x661558) goes, and then click on Quantity and put in "131535", click on Set and change it to Set To. Do the same for the 2nd action.
Now to actually place your flame graphic on the field, use a normal Create Unit action to create a Scanner Sweep unit. If you just create it and do no other trigger actions, you'll get a ring of 9 flames that will permanently display on your map, which will nifty is pretty silly looking. The very nice trick here is that the first graphic created by the scanner sweep iscript is the one that is precisely on top of where the scanner sweep unit was created, and if you use a Remove Unit At Location action in the
next trigger cycle, you can remove the scanner sweep after it has created only a single flame in exactly the spot you want. What is even niftier still, is that you can create multiple scanner sweep units in the same trigger, changing the graphics each time (steps 7-8 above) and placing more on the map. Then in the next trigger cycle, you can remove all of them at once with a simple "Remove Unit" action, and you'll get multiple different fire graphics (or whatever graphic you chose) in a single trigger cycle; so you don't have to take multiple cycles to set up multiple different grpahical effects on the field. If you reset the scanner sweep sprite back to its default value (546) at the end of the trigger that creates all the scanner sweeps, then players will be free to use scanner sweep normally without any impact on their gameplay whatsoever (triggers always run after all player actions at the end of a frame, so if you reset the sprite value back to normal, no players can ever be impacted).
One nice tidy way to do all of this is to have a Wait (1) action in your trigger after you've created all of the scanner sweeps, and then put the Remove Unit action after the wait, that way you don't need to use a 2nd trigger with a DC timer or any other malarky. If you have classic hyper triggers in your map then using a wait like this could cause wait blocks, but that can be entirely avoided if you use the below trigger to provide EUD hyper triggers, which works the same as classic hyper triggers (~11.90 trigger cycles per second) but avoids all wait blocking problems entirely:
- Always
-> Modify memory at at Death Table +203151 Set To 1
-> Preserve Trigger
If you set it to 0 and preserve it, then you get 'super' hyper triggers, where triggers will execute ~23.80 times per second (so any classic hyper trigger DC timers will run at double speed). Note that this might create extra lag in your map.
Note: using EUDs will make your map play with classic 1.16.1 unit limits, rather than the expanded limits otherwise available in SCR.
Good luck!
Post has been edited 4 time(s), last time on May 28 2018, 9:36 pm by Lanthanide.
None.