Ambush and Defense

Mapping & modding Fallout Tactics and reviewing maps thereof.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

0 is midnight, -1 is the absence of light. Set at 0 you (the player) can still see a fair amount even in a building with a whole roof or underground. Set at -1 the map is black and you can't see anything without a light source. Depends whether you want to hide things from the player or just penalise the player character unless they are a night person.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
quietfanatic
Respected
Respected
Posts: 88
Joined: Sun Jan 04, 2004 1:54 am
Location: Sydney, Australia

Post by quietfanatic »

That could be useful for underground stuff. It's a shame that there is no flare or torch entity (unless you can play around with 'glowing one' somehow.
Forgive my ignorance master.
DIE...die weak fool (cue Bozar death)
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Well you can divide your dark/underground areas into small zones, and place a light in each. Then make a generic entity with the torch sprite and have triggers that turn on and off the lights as the player moves through the zones (if they have the torch equipped) which works quite well but needs a fair bit of work to set up.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
quietfanatic
Respected
Respected
Posts: 88
Joined: Sun Jan 04, 2004 1:54 am
Location: Sydney, Australia

Post by quietfanatic »

I just worked out an alternate way of simulating a torch. Unfortunately, it only works for one person in it's current state, so I'll try to fix it first.

EDIT:

I suppose you could just make more than one torch entity, but here is how it works with just one. It creates a circle of light centred on the actor of choice, which moves to follow him at a rate of about once a second, not instantly like in the original Fallout games. I think it would be easier than using zones.


turnlightoff P

CONDITION:
Human has Less than 1 ItemsTaggedEquipped torch at Anywhere

ACTION:
Set light script state unchecked

.........................

turnlighton P

CONDITION:
entity x has Exactly 1 ItemsTaggedEquipped torch at Anywhere

ACTION:
B Move unit light to entity x
Set light script state checked

movinglight P

CONDITION:
entity x has Exactly 1 moving at Anywhere
entity x has Exactly 1 ItemsTaggedEquipped torch at Anywhere

ACTION:
Move unit light to entity x

........................

This part is repeated for each member of the team, where entity x is the tag name of the actor.
Forgive my ignorance master.
DIE...die weak fool (cue Bozar death)
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Hmm I tried that but I didn't like the lag which is why I went with the zones, it's not that difficult to divide an underground passage into zones.

I was also worried about the light transporting into a tile or entity and crashing the game, though thinking about it now I suppose lights are really only 1WU cubed.

The advantage, I felt, of using zones was the transition was slightly smoother and you could set lights at predetermined levels and turn them on slightly ahead of the player.

But each to their own using the moving method is certainly a lot easier to use. Especially above ground, the zones method works best in small areas (as there's less to set up :) ).

Edit. I've just checked my test map and my triggers were slightly different to yours.

I set up a torch entity tagnamed Torch and a light entity for each recruit. So I had the main character tagnamed player and the torch light tagnamed player_torch, Recruit 1 and 1_torch etc.
So my triggers were

Light follows player (Preserved)
condition:
Always
Action:
move unit player_torch to player
move unit 1_torch to recruit 1

Turn on Player torch (Preserved)
Condition:
unit player has exactly one itemtaggedequiped Torch at anywhere
Action:
Set object script state player_torch ticked

Turn off Player torch (Preserved)
Condition:
unit player has less than one itemtaggedequiped Torch at anywhere
Action:
Set object script state player_torch unticked

Turn on Recruit 1 torch (Preserved)
Condition:
unit Recruit 1 has exactly one itemtaggedequiped Torch at anywhere
Action:
Set object script state 1_torch ticked

Turn off Recruit 1 torch (Preserved)
Condition:
unit Recruit 1 has less than one itemtaggedequiped Torch at anywhere
Action:
Set object script state 1_torch unticked

Then the same for the other squad members so they can all have a torch or if there's only the one it doesn't matter who holds it. Though I still think the zones are smoother especially if you overlap them and have each zone turn on the light in the next zone.

Edit2. Actually I meant to mention that trigger but forgot all about it, but not for a torch. I'm using it for a dog npc that follows the player but isn't under your control.

The main difference is instead of moving a light I've set up a waypoint, tagnamed dog_wp.

Then as above

Condition (preserved)
always
Action
move unit dog_wp to player

and to move the dog

Condition (preserved)
always
Action
set Dog to WayPoint at dog_wp

The dog will go off and attack enemies, even if you run away, but as long as it can see you afterwards will start to follow you again.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
quietfanatic
Respected
Respected
Posts: 88
Joined: Sun Jan 04, 2004 1:54 am
Location: Sydney, Australia

Post by quietfanatic »

That could be very useful, as it effectively lets us use an extended 'follow' command (I've never been able to get the original trigger to work).
Forgive my ignorance master.
DIE...die weak fool (cue Bozar death)
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

I've only been able to get the follow trigger to work with npcs. I.e. have a dog follow an npc, but never with a human controlled character.

The only thing is the dog won't follow you onto the world map so if you want it to see out the campaign you'll need to add it and the waypoint to every map including the landscapes with campaign triggers to turn it on or off.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
quietfanatic
Respected
Respected
Posts: 88
Joined: Sun Jan 04, 2004 1:54 am
Location: Sydney, Australia

Post by quietfanatic »

You would just make at a pc if you wanted that. I'll check to see if there is a limit.
Forgive my ignorance master.
DIE...die weak fool (cue Bozar death)
User avatar
S4ur0n27
Mamma's Gang member
Mamma's Gang member
Posts: 15172
Joined: Sat Jun 01, 2002 10:14 am
Contact:

Post by S4ur0n27 »

Image

I'm not a pimple on this black soldiers ass, sorry.
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

Susan, I'm going to put this in the only way you can understand:

OMG keep the spam in the wasteland kthxbye

Oh, and D :
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Okay quietfanatic, you've got me convinced to use the move method for the light rather than zones, mainly because my underground areas have trebled (in size and amount of underground maps) and I'm too lazy to divide them all up. :)

I've been messing around with the flare, I created a throwing weapon that does one damage, called it a flare and tagged it flare in the entity editor and then set up a light entity tagged flare_light.

Then with three triggers I've made a working flare, well sort of.

All preserved.

Condition
human has more than 0 items tagged flare
Action
oss of flare_light unticked.

Conditon
unit player has more than 0 items tagged flare equipped
Action
oss of flare_light ticked
move flare_light to player

Condition
human has less than 1 items tagged flare
Action
oss of flare_light ticked
move flare_light to flare

The first trigger turns off the light when you pick up the flare but don't equip it. You'll probably need a copy of this trigger for each player index used, in case one of the actors picks up the flare or you can do away with this entirely?

The second trigger makes the light follow you around if you have the flare equipped, this will need to be set up for each squad member with their tagnames.

The third trigger will move the light to where ever the flare lands if you throw it. Again you might need to set this trigger up for the other player indexes in case they throw the flare.

The only problem is you can re-use the same flare over and over, though perhaps adding a variable and a timer could make them runout (I'd recomend making them remove on exit so they can only be used on a specific map until you find some more). You would need the same triggers for each flare entity as well as a new tagname for each flare.

One thing I've noticed about forcing the time to -1 is that once done you can't turn the lights back on without reloading the map in the editor, or if you've saved it as -1 then opening the map as tiles only and then changing the time.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
User avatar
[HpA]SniperPotato
Desert Wanderer
Desert Wanderer
Posts: 518
Joined: Fri Dec 17, 2004 2:23 am
Location: Everywhere and Nowhere
Contact:

Post by [HpA]SniperPotato »

Dear god no, fuck all that. Flares are simple.

Ok heres what you do

make an entity, i chose the Molotov picture because flare can't be thrown, then put it on the map. Give it a tag name like Flare1, Flare2, how ever many flares you want. Then put a light somewhere hidden on the map and give it a tagname like Flare1Light, I use green so its kinda like a glowstick. Then for the triggers put:

Always, move Flare1Light to Flare1 or some junk like that and set it to Preserve

Now, on the map itself, just throw it and it will create a light, but you have to throw it each time you want the light to go.

it works, its simple, its sweet


BTW, I didn't read the above stuff so if you already mentioned this then don't flamez0r me :crazy:
Fallout Tactics multiplayer: COOPnet and MegaCOOP map pack
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Well it does help to read someone's post before replying.

My triggers are basically the same though with mine you can start with inert flares, and then ignite them by equiping them. I've since done away with turning them off if in your inventory but not equipped but added a timer so that they burn out after a random amount of time.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Our Host!
Post Reply