• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Some Logical Thinking Required

Status
Not open for further replies.
I'm going to create a Civ 5 type game and as always I'm mapping out how I'll implement all the features.

The only one I seem to be running in to is easily creating a system in which triggers and / or data can recognize the implementation of resources from the ground around a city.

Shy of creating a boat load of regions and triggers with condition "if unit is in region..", I'm not sure how I'll do it.

I've thought of creating dummy units each with their own behaviour, for example "Wheat" could be a dummy unit and the behaviour can be added to any unit within "xxx" range.. but I'm hoping to find a more efficient system.

Any ideas?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
There are two approaches that spring to mind that depend on the requirements.

If everything has to be in a tile system then you could create a map of all resources. You then do an iterative search through the city area checking every tile on your map for resources.

The other approach for a non-tile system is to make resources units and then just check for all the resources around the city. No need to get the resources to add any buffs as you could just populate a group with all the resources around the city.
 
If everything has to be in a tile system then you could create a map of all resources. You then do an iterative search through the city area checking every tile on your map for resources.

I didn't realize checking the tile was possible with Sc2 GUI triggers.

The other approach for a non-tile system is to make resources units and then just check for all the resources around the city. No need to get the resources to add any buffs as you could just populate a group with all the resources around the city.

Hmm. I suppose I could create physical units for each type of resource and then spread them around the map, then check to see if the city has one nearby.

Edit: Offtopic here but I don't want to create a new thread;
Is there a way to create a unit with multiple models in it without editing the actual unit model itself?
I.E If you've played civ then you know what I mean; I want to have multiple units walk in unison while only having one actual unit selected.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
I didn't realize checking the tile was possible with Sc2 GUI triggers.
What? I said you create a map (an array) which can be translated into real locations on the map.

Is there a way to create a unit with multiple models in it without editing the actual unit model itself?
I.E If you've played civ then you know what I mean; I want to have multiple units walk in unison while only having one actual unit selected.
Should be possible. The actual unit actor is the main unit while it also creates some offset actors which then create other units. Synchronizing the animations I am not sure about.
 
What? I said you create a map (an array) which can be translated into real locations on the map.

Lol no idea how to do that, but thanks for the pointers :p

Should be possible. The actual unit actor is the main unit while it also creates some offset actors which then create other units. Synchronizing the animations I am not sure about.

Figured as much. I might try straight up attachments.. maybe if I mess with turrets I can produce some results.
 
I do not see what turrets have to do with it... The idea is similar to how you make compound units such as the Uberlisk.

Indeed. I meant to say turrets could be set to the unit with an offset position, that deal 0 damage (or have 3 units total each dealing 1 damage thus having a total damage of 3) that way they all appear to fire on their own but also in similar unison.

If I were to create an uberlisk-type unit then one unit may be able to fire while the rest can't, which would look a bit dumb (due to range issues).
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
I do not see what turrets have to do with it... The idea is similar to how you make compound units such as the Uberlisk.

I will invade this thread for a little question regarding turrets (cause it's not that important). A Point Defense Drone unit with model of Observer and the same weapon and turrent type, even other turret types does not want to direct the laser (the same PDD laser) on all sides on which enemies, the beam only appears in the direction it faces. Does it come from the model?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,217
Yes and turrets use a turret attachment actor to map it to a turret model part.

Without them a turret will only allow a limited amount of virtual mobility to a weapon. If you want the turret to support 360 rotation you need to give it a 360 arc (an arc of 0 will mean it will support no rotation).
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
What do you mean by 'a turret model part'? The effect is exactly actor based, as you say because since the effect appears, the Observer model as a 3d model has nothing to do with the direction of the laser which is a separate effect.

So do you mean adding a 360 site Operation to the actor? I will check it out today or tomorrow.
 
Status
Not open for further replies.
Top