• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

{Closed} Lightning System

Status
Not open for further replies.
Level 19
Joined
Oct 29, 2007
Messages
1,184
I've just figured out a way to make a lightning system, that gives each player a sun-thing. I don't know if you would like to use that, it looks a little like HDR, but it's not advanced at all.

The version I have uses two units, and two variables with arrays (except from tmp_loc's and stuff.) Nothing advanced.

However.. In my map all players are enemies, and that's the only way I can make the sun-unit for one player invisible to the others.

What do you tink about it?
 
Level 25
Joined
Mar 25, 2004
Messages
4,880
Very interesting. Could you link your system so we can check it out? Having that HDR lighting affect that WoW has for the player's character will be very handy in making our mod even more unique than other WarCraft III mods... graphically. :grin:
 
Level 19
Joined
Oct 29, 2007
Messages
1,184
Okay here's the idea:

First you need to create a dummy unit, name it lightning unit, or something like that. Import the glow model from UTM to your map, and then select it as the model for lightning unit. Give the unit the abilities ''Locust'' (that will make it unselectable ingame),''Permament Invisibility'' (This will make the unit only visible to the owner+ allies which could be a problem since everybody should have their own lightning source-thing) and ''Invulnerable (neutral)'' (This will make it impossible to kill the unit). Don't forget to make lightning unit a flyer! That way he'll be totally walkable. That would be all for the object editor.

At map initialization we now need to create a lightning unit, and set last created unit to the unit variable lightning_glow (Or whatever you wanna name it). In my map I change the animation speed of lightning glow to 0.00%.

  • Lights
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer tmp_integer) from 1 to ''how many players are in the map'', do (Actions)
        • Loop - Actions
          • Set tmp_loc = (Position of ''the unit owned by player''[tmp_integer])
          • Set tmp_loc2 = (tmp_loc offset by 550.00 towards 225.00 degrees)
          • Unit - Move lightning_glow[tmp_integer] instantly to tmp_loc2
          • Custom script: call RemoveLocation(udg_tmp_loc2)
          • Custom script: call RemoveLocation(udg_tmp_loc)
All these values can be changed and configurated the way you would like to use them.

There are some more lightning models in UTM. If you use more lightning units for each player and just follow this pattern I'm sure you would be able to create something cool. :p

This is really not difficult to do, but it can take alot of time to find optimal settings. Hope you find this useful. ^^
 
Status
Not open for further replies.
Top