[Project] Third Person Shooter

wingdnosring

New Member
Reaction score
16
[Project] Third Person Shooter System

I have developed a third person shooter system for other people to use for their own projects. Obviously it is still a Work in Progress, so don't expect anything too fancy! Also, I'm designing this system for use with models in the future that enable custom items, attachments, and perhaps marines that can crouch, so the current stand-ins are more for testing the triggers than actually looking good. I will continue working on this and uploading my progress regularly to show how I'm doing. Please try the map and leave feedback or make suggestions.

Please be aware that this map contains cartoon violence and lots of gore
Not that I think a warning like that will actually put anybody off...

Version Seven Has Been Uploaded! :)

Please leave feedback or suggestions! I've noticed a lot of people are viewing the attachment without giving any feedback.

Simply use WASD to move and R to reload (your character will reload on his own if you run out of ammo), left click fires, right click zooms in a bit. Right click + W allows you to sprint. Q is used to get into nearby cover. Space bar is used to pick up different weaponry (they look like floating balls until I can get a decent custom model or two in there). 1 and 2 switch between sticky grenades and your primary weapon. 5 is used to switch between squadmates. Use E to use your melee attack.

Check out this page for more information on progress, known bugs, etc: http://forums.sc2mapster.com/development/project-workplace/4393-third-person-shooter-system/#p2
Please feel free to request new functions, actions, weapon options, or anything else.

Version 8 and onwards will be too big to post here, so I will be migrating nearly everything over to the link above.

List of Functions and Actions in Version 7:

Functions

Weapon Functions

Weapon Being Used: Returns the identifier of the weapon used by a specific unit
Firing Style of Weapon: Returns the firing style of a weapon via its identifier
Rate of Fire of Weapon: Returns the cooldown time on a weapon
Recoil on Weapon: Returns the recoil (angle change for player) of a weapon via its identifier
Bullet Variation of Weapon: Returns the bullet variation assigned to a weapon
Weapon's Clip Size: Returns the clip size of a weapon via its identifier
Weapon's Maximum Ammo: Returns the maximum amount of ammunition held for a weapon via its identifier
Scope Distance: Returns the amount of camera zoom associated with each weapon
Weapon Launch Sound: Returns the sound link associated with a weapon
Missile Number: Returns the Identifier associated with a missile unit

Other Functions

Squad Number of Unit: Returns the squad number assigned to a specified unit
Unit is a Squad Member: Returns true if the specified unit is part of a player's squad
Entire Squad is Dead: Returns true if a specified player has lost their entire squad
Loadout Status: Returns true if a player is still in their loadout screen
Specific Player is Moving: Returns true if a player is currently moving their controlled unit
Any Player is Moving: Returns true if any player is currently moving their controlled unit
Next Living Squad Member: Returns the number of a specified player's next living squad member
Squad Member: Returns a specified squad member for a player
Controlled Member: Returns the unit currently controlled for player
Highest Identifier In Use: Returns the highest weapon Identifier used so far
Total Identifiers In Use: Returns the number of Identifiers being used
Next Identifier In Use: Returns the next Identifier in use after an integer
Last Identifier In Use: Returns the last Identifier in use after an integer
Equipment Being Used: Returns the weapon currently in use for a unit
Unit is out of Ammo: Returns true if the specified unit has no ammo remaining in his current weapon. Only works for squad members
Current Bullet Variation: Returns the user's current bullet variaiton. Bullet variation changes from time to time. The base value the user sets is alterred quite a bit depending on who's using the weapon and how
Detect Collision At Point: Returns potential targets for a missile to hit

Actions

Change X Control: Every control I have in place can be customized. Each control has its own action
Set Enemy Weapon: Sets an enemy to use a custom weapon via its Identifier
Set Enemy Accuracy: Allows you to set all enemies on the map to have an accuracy of 1-20 with custom weapons. The higher the value the better their aim
Create Weapon: Allows you to create a brand new custom weapon form scratch
Set Weapon Images: Sets the icon and scope image of a custom weapon via its Identifier
Set Weapon Behavior: Allows you to change the behavior behind a weapon's bullets. Please note that Instant and Instant Trail do nothing for the time being
Set Controlled Unit: Sets the controlled unit for a player. Only use this at map initialization
Set Squad Member: Sets a specified unit to be in a player's squad. Squads can only have up to four units
Turn off Loadout: Turns off the Loadout Dialog at the start of the game for a specified player. Again, this should only be run at Map Initializaiton
Switch to Squad Member: Switches control for a player to a specified squad mate
Set Weapon Slots: Sets the number of weapon types than can be held. The default is four
Order AI Controlled Unit to Reload: Orders a computerized player to reload
Order Controlled Unit to Reload: Orders the unit under contorl of a user to reload
Blast Pistol Explosion: Calls for the detonation of all blast pistol shots that made contact with targets for a specified player
Set Ammo Box Respawn Rate: Alters the length of time it takes for a specific ammo box to respawn
Create Equipment: Allows you to create new forms of equipment. At the moment this is a very simple, but limited process
Change Unit's Extra Ammunition: Changes a unit's spare ammunition to a value. Only works with squad members
Fire Missile Instantly: Fires an instant missile at a specified pitch in a specified direction

-----------------------------------------------------------------------



Version History
Code:
[U][Version 1][/U]
-Sound added while shooting weapons

-Hipfire accuracy reduced and aiming accuracy increased

-Altered aiming slightly

[U][Version 2][/U]

-Fixed a load of bugs

-Added in a secondary weapon for people to pick up.  The flamethrowers actual effect looks kinda bad right now, but I'm more interested in getting the triggers working than altering cosmetic stuff.  You will notice that the flamethrower is almost entirely different from the standard assault rifle in terms or ammo speed, attack look, sound, etc;
 
-Added some more triggers that will memorize the ammo on each weapon that is dropped.  (Example: you drop a weapon that has 15/50 ammo.  It will still have 13/50 if you pick it back up.)  This will work for an infinite number of weapons.

[U][Version 3][/U]

-Fixed Bugs

[COLOR="Green"]-IMPLEMENTED COVER![/COLOR]

[U][Version 4][/U]

-Latching onto walls was improved in every way, from functionality to camera and sidling angles

-Reloading was optimized slightly

-Projectiles now look the correct way upon creation

-Bullet trajectory now compensates for cliffs

-Target added to the center of the screen to help with aiming while zoomed in

-Doubled recoil when firing without holding the right mouse button down

-Bullets can finally go over objects and cover!

[U]Version 5[/U]

-Bullet Yaw overlaps the aiming target earlier.  This means bullets cross the center of the screen at mid-range and overlap it significantly by the end of their life

-Movement has been adjusted to better suit terrain

-Cover has been improved yet again

-Bug Fixes

-A third weapon: the Scoped Precision Rifle

-Better projectile checks to make bullet fire more pinpoint

-A cliff was added so people can try shooting down at enemies.  Keep in mind the cliff cannot be used as cover, but the obstacle on top of it can

-Sticky grenades are now accessible.  Because the Marine is so limited on animations, his attack animation makes it seem more like he's got a grenade launcher attached to his gun than a grenade in his hand, but the firing should be working.  Sticky grenades cling to any surface they encounter, including cliffs, units, and cover

-Naturally, with sticky grenades comes the ability to switch weapons with 1, 2, 3, and 4.  At the moment, only 1 and 2 are in use, but I've designed the weapon switching appearance to work for up to four different types of weaponry

-Skybox added

-Fog added

-Battlecruiser added so players can try shooting at flying targets

-Custom death animations based on killing blows

-Adjusted bullet fire to prevent cliffs from messing up their points of origin

-Slightly smoother camera movement

-Proper impact effects.  You will notice that organic units bleed, while synthetic enemies get covered in sparks

-Bullet travel, damage, collision, and shooting have all been altered for up to 14 players rather than 1

[U]Version 6[/U]

-Fourth, Fifth, Sixth, and Seventh weapon added: Burst Rifle, WC-13 (Shotgun), Blast Pistol, Plasma Turret respectively

-Explosion Effects were added to grenades

-Bug Fixes

-[COLOR="Green"]Aggresive enemies![/COLOR]

-Added a proper condition to bullets as they travel to stop them from damaging units off to the side of their present course.  I have also added two priority checks while detecting collision.  Basically this makes cover more effective if a unit is behind it, but less effective if the unit is between the bullet and the cover

-Health and Shields added to the Marine.  The custom UI has been adjusted to show health and shields respectively.  For the moment, shields regenerate, but health does not to encourage defensive gameplay

-Impact effects now play their non-biological effect when damaging shields

-Battlecruiser removed and terrain reformed to be a little more interesting and make testing easier

-Spawns added to give some actual gameplay to test

-Added in height and width checks to allow users to create enemies of varying sizes (ghosts and ultralisks for example).  From now on the 'Radius' field in the Data Editor determines bullet collision in terms of width.  I had to get a little more creative for height.  The supplies used/10 equals the height of your unit.  So if you're using a unit that is 0.9 tall, their supplies field needs to be -9

-[COLOR="Green"]Squad based gameplay[/COLOR].  You will be able to switch between four different soldiers at any time

-You can now select loadouts for your squad.  Since little is actually in the game so far, this is limited to choosing what weapon they each start with

-Bullet pitch has been adjusted to better match your camera pitch

-Basic enemy AI has been put in place

-Bullet travel/collision/detection/creation now works for up to 14 user controlled characters and an infinite number of computer controlled enemies and allies

-Improved impact effect accuracy

-Added in a not-so-subtle distinction between bolt-action weapons and semi-automatic.  Bolt-action weapons now have their accuracy significantly reduced when not scoped in.  Since there are no Bolt-actions currently in the game, this is not something you will be able to see yet, unless you add in some wepaons of your own

-Added a new style of weapon: Scattered.  It works more or less the same as Semi-Automatic, but Scattered fires a whole burst in one bullet, like a shotgun

-Implemented my triggers into a new library.  This should make editing much easier for other people

[U][Version 7][/U]

-New Weapon Added: Inhibitor Shotgun

-Bug Fixes

-Removed the library's dependancy on Vespene and Minerals.  This means that users can now use minerals/vespene values however they choose

-Implementation of Tall Cover (things you can hide behind but cannot shoot over)

-"Impales Targets" has been altered slightly.  In verison 6, weapons that impaled targets could go through cover as well as enemies

-The Scattered firing style has been altered in terms of bullet variation.  It will no longer be affected by aiming vs hipfire

-Explosive Ammunition added

-The ability to customize your scope when aiming has been added.  The customization options allow any texture you wish, with custom colouring recoil variation, transparency, and size

-Creating weapons has been broken into several steps now.  Base values like bullet variaton, missile type, etc are all in one line, but images and advanced attributes each have their own now

-Bullets are now created at the correct height.  Impact effects also have had their heights adjusted to better match the bullet's trajectory

-The Marine turns much faster

-A ton of new functions and actions have been added.  Look below for more information

-Users can now customize controls however they wish.  Any control you don't want (like getting into cover or switching between squad mates) can now be disabled

-Identifiers no longer need to be in order

-Four sets of health/shields have been put at the side of the screen to represent your squad mates.  Any Squad Mates not in use will have their bars hidden

-Added an icon beside the life and shield dialogs of your squad mates when they run out of ammo

-Squad units go through proper ammo now and no longer use custom values for anything, due to their unreliability

-Users can now change the length of the weapon swapping dialog.  This means you can competely eliminate switches in equipment if you wish

-Users can now customize the type of equipment at their disposal.  You could give one squad member four different types of grenades and another four different primary weapons.  Still another could have one primary weapon and three different grenades  (note that version 7 does not actually give AI controlled units the ability to use grenades yet)

-The ability to create customized equipment has been put in place, but at the moment it is limited to ammo, an icon, and a choice between grenades, primary weapons, or ammo

-Burst Delay added to list of weapon behaviors

-Recoil has been adjusted to better alter the user's shooting.  Before now, all the 'camera recoil' variable did was change the user's camera pitch slightly with each shot.  Now, a circle will expand around the aiming recticle and bullet variation will increase dramatically with continual shooting.  Firing in bursts helps to prevent bullet variation from getting out of hand.  This option can be toggled on or off via a boolean variable when creating weapons

-Instant bullets have been added.  Instant bullets also finally enable beam models as missiles!

-Melee Attack added

-Explosions now shake your camera if you are in close vicinity

Special thanks to anybody who posted with feedback or answers to problems I was having, Onisagi especially. For a guy with only 14 posts, he sure knows his stuff :eek:.
 

Attachments

  • Third Person Shooter System V7.0.zip
    953.4 KB · Views: 674

sqrage

Mega Super Ultra Cool Member
Reaction score
514
Looking like a good beginning. Would be nice if it was a little smoother but I'm well aware of how hard that is to pull off.

Keep at it. :thup:
 

wingdnosring

New Member
Reaction score
16
Thanks! The latest change I just made was the addition of cover. A basic form of it is uploaded above, but I'm still fine tuning the camera angles, animations, etc; to make it more appealing.
 

BlowingKush

I hit the blunt but the blunt hit me.
Reaction score
188
instead of moving the unit instantly, just have him move to a point to the right or left oh his position and then stop him after the key is released using Order Unit triggers.
This would prolly get rid of the movement choppiness
 

wingdnosring

New Member
Reaction score
16
I am working on that in this version, but thank you very much for the input. My only concern with this is how to make him move sideways without him turning. Turning sort of spoils the effect, but I'm looking into options.
 

wingdnosring

New Member
Reaction score
16
I would really appreciate it if more poeple left feedback or possible solutions to the problems I've listed above. Some of these really block the upload of the latest version because they stand out so much. A good example would be adding models to effects. I don't know if it's possible or not, but Version 5 can not possibly be uploaded until the grenade actually explodes.

If there's one thing I really hate about the SC2 editor so far its the lack of cooperation between the data editor and trigger editor. It seems like you can either trigger or use the data editor, but rarely both. Very few tasks are completed with a bit of each, it seems :S.
 

Sensang

TH.net Regular
Reaction score
7
I would really appreciate it if more poeple left feedback or possible solutions to the problems I've listed above. Some of these really block the upload of the latest version because they stand out so much. A good example would be adding models to effects. I don't know if it's possible or not, but Version 5 can not possibly be uploaded until the grenade actually explodes.

If there's one thing I really hate about the SC2 editor so far its the lack of cooperation between the data editor and trigger editor. It seems like you can either trigger or use the data editor, but rarely both. Very few tasks are completed with a bit of each, it seems :S.

what i really dislike about the data editor is that people complain about it without knowing much anyhow^^

http://www.jx3.net/TDG/forum/viewtopic.php?f=101&t=3449&sid=fcdc42d3b09cf19ff5eec0e0fe27816c

that might help you
 

wingdnosring

New Member
Reaction score
16
Ahh thanks alot, I'm looking at it now. I wasn't complaining about the data editor, it's a very useful tool (even though I'm not too familiar with it yet), it just seems that there is a disconnect between triggers and data editing :S.

[Edit]: I'd actually seen that tutorial already. The problem is that missiles don't have explosion effects in their animations. Instead, Blizzard made Impact models as entirely seperate entities. So the issue is somehow getting an impact model to the point of the bullets as they hit a target. I've tried creating a seperate impact unit upon contact, but the height becomes awkward. You end up seeing the impact effect drop down through the air to the proper height, which is quite dissorienting. If I could somehow attach an impact model to the missiles, or better yet, add the effect to their timedlife behaviors, it would look great.
 

onisagi

New Member
Reaction score
6
Please leave feedback or suggestions! I've noticed a lot of people are viewing the attachment without giving any feedback.
Maybe cause a lot of people are still learning the editor, and your map is more advance then their own knowledge? There are a lot of people who are really good at the editor already that has released tech demos and tutorials, just put more effort in looking around, and learning from the achievements and mistakes of other people. Hopefully providing feedback to those that need it along the way.

-Getting a darn skybox to work!
Refer to a page of this wiki for some skybox previews:
http://www.sc2mapster.com/api-docs/galaxy-editor/modules/data/data-type/terrain/
the page refers to Data module -> Terrain Texture Sets -> The fields under the texture set that you're using "Bel'Shir". Excuse the lack of documentation on the rest of the fields, I got a bit lazy so i only included stuff that matters for people trying to make their skybox work. There's other fields here that may be of interest to you that i'll mention when i answer your next questions.

-Looking into how to hide health bars from players when they press "Alt"
Try keeping the unit deselected? (there's an Action for it) Maybe someone knows a better way, but i believe a lot of people are using this work around.

-Altering the Pitch of beam weaponry. An example would be the Ghost's "Snipe" ability missile. Right now you have a perfectly horizontal line that moves up and down instead angling upwards or downwards
It's only a problem if you're using visible projectiles. Maybe see if the colossus or void ray weapons can help ya. I've also noticed your bullets seem to hit the floor and suddenly jump into the air really high before the "hit object" animation occurs in midair, is that bullet physics? Trajectory seems strange.

-Stopping the Marine from turning awkwardly when approaching unpassable areas
Haven't played around with this, maybe remove the unit's AI so it doesn't ever attempt to path on its own? This isn't a problem for movement systems that use "move unit instantly".

-Since all my bullets are triggered, I have no idea how to add impact effects to units, which is already becoming a problem with the addition of grenades
Action: "Create effect at point"

-Now that swapping weapons has been added in, I'm at a loss for how to alter the UI with the game UI hidden. Ideally I would like some boxes to be put on the screen, each with a picture (1 would have a gun, one would have a grenade, etc; but I'm not sure how to go about this without creating a ton of custom filters
Hide Game UI using ->
Action: "Hide game UI for all players"
Either use boss bars, or custom dialog entities ->
Create a "Dialog" attached to a Dialog variable, then create "Dialog Items" for the created dialog and attach to a Dialog Item variable. Update the dialog item variable periodically for bullet count/hp/etc. There's a tutorial somewhere, but its not hard to figure out.

-Dealing damage via triggers always results in the 'blast' death animations. Is there any way to change the standard animation response to triggered damage?
Well you specified the type of damage to be triggered initially, you just edit that in the data editor. They're chained to effects that you can change.

Let me know if there is noticable lag. It's hard for me to tell for two reasons: 1) my computer doesn't quite reach starcraft's recommended requirements (thankfully I'm upgrading soon :S) and 2) when looking towards the edge of the map it tends to clip a bit. Starcraft seems to have trouble if players are looking out past the map boundaries. I'm trying to get a skybox working to limit that clipping, but we'll see how that goes.
I have practically top-of-the-line hardware for gaming, yet it still stutters and has the clipping that you saw. The stutter is due to the way you move your camera/unit. I have some ideas on how to create smooth FPS movement, but i haven't had the time to work on it. Unfortunately, i have yet to see smooth movement in 3PS that is intuitive, the most advance 3PS system I've seen still falls victim to stuttery camera/unit. I'll make a public release if i ever get around to working on it, i'd much rather see higher quality maps than be greedy with knowledge. I'm not sure how to reduce that clipping at the horizon line. It could be the limitations of the engine, but i like to believe someone will figure it out someday. You can use Fog to reduce your viewing distance, it helps a little bit (unfortunately it doesn't do much for the horizon line). I explain a little about it in the wiki page above. Start with a Fog height equal to your terrain height, and play around from there. "Fog Distance Near" is like the distance from your unit you want the fog to be cleared out, your "Fog Distance Far" must be a larger number or it'll look like you have fog coming off your unit only.

I would also like to make a small request: It would be AMAZING if somebody could rig up a very simple model (based off the Marine) that could crouch behind cover and aim over cover. Also, removing his weapons to allow for an attached weapon would be good too.
Not sure if this is what you're hoping for, but it looks promising:
http://www.thehelper.net/forums/showthread.php?t=150055
 

wingdnosring

New Member
Reaction score
16
Awesome, thanks for the detailed response!

Refer to a page of this wiki for some skybox previews:
http://www.sc2mapster.com/api-docs/g...-type/terrain/
the page refers to Data module -> Terrain Texture Sets -> The fields under the texture set that you're using "Bel'Shir". Excuse the lack of documentation on the rest of the fields, I got a bit lazy so i only included stuff that matters for people trying to make their skybox work. There's other fields here that may be of interest to you that i'll mention when i answer your next questions.

I'm looking at it now. I didn't realize you even had to use the data editor for this :S. I thought the trigger "Turn Skybox On" would be enough.

Try keeping the unit deselected? (there's an Action for it) Maybe someone knows a better way, but i believe a lot of people are using this work around.

So a periodic event that deselects all units on the map will do the trick? It's really only destructible health I want to hide, I don't mind the rest. I'll give that a shot.

It's only a problem if you're using visible projectiles. Maybe see if the colossus or void ray weapons can help ya. I've also noticed your bullets seem to hit the floor and suddenly jump into the air really high before the "hit object" animation occurs in midair, is that bullet physics? Trajectory seems strange.

Not bullet physics, merely an unfortunate result of me not knowing the editor well enough yet. My impact models were compeltely seperate from the missiles. So I was creating the impact model high in the air and then adjusting its height to the bullet's height. This gave the bizarre effect you're describing, which is why I needed to know how to make proper effects at X,Y,Z points.

I'll try the "Create Effect at Point" and see if it works. Hopefully it allows height variations...

Haven't played around with this, maybe remove the unit's AI so it doesn't ever attempt to path on its own? This isn't a problem for movement systems that use "move unit instantly".

I am moving the marine instantly, which is why it seems so strange that he moves sideways like that. I even added in conditions that prevent him from trying to move anywhere unpassable, but it didn't seem to fix the issue.

Either use boss bars, or custom dialog entities ->
Create a "Dialog" attached to a Dialog variable, then create "Dialog Items" for the created dialog and attach to a Dialog Item variable. Update the dialog item variable periodically for bullet count/hp/etc. There's a tutorial somewhere, but its not hard to figure out.

I haven't experimented with Boss bars yet. Can you set Icons or names to them? And can you adjust their size? I'll mess around with them a bit to find out or search for a tutorial on 'em.
As for Dialogs, how do they differ from Warcraft 3's? I just assumed it would cover the whole darn screen with button options again, which wouldn't quite achieve the effect I'm looking for.

Well you specified the type of damage to be triggered initially, you just edit that in the data editor. They're chained to effects that you can change.

Actually I didn't. I didn't see a way to specify damage in the Trigger Editor, so I simply resorted to "Set Life of Picked Unit to Life of Picked Unit (current) - Bullet Damage". Clearly I need to mess around with the data editor some more.

Not sure if this is what you're hoping for, but it looks promising:
http://www.thehelper.net/forums/showthread.php?t=150055

I've been following that too :). Outfitting him with more armour might be a pain though. I really just need a marine with a few extra animations added in.

Maybe cause a lot of people are still learning the editor, and your map is more advance then their own knowledge? There are a lot of people who are really good at the editor already that has released tech demos and tutorials, just put more effort in looking around, and learning from the achievements and mistakes of other people. Hopefully providing feedback to those that need it along the way.

They should still be able to leave feedback though. They don't have to offer technical advice, but they could say "Well, how about you add this? That would be awesome", or "these bullets look a little weird."

I have practically top-of-the-line hardware for gaming, yet it still stutters and has the clipping that you saw. The stutter is due to the way you move your camera/unit. I have some ideas on how to create smooth FPS movement, but i haven't had the time to work on it. Unfortunately, i have yet to see smooth movement in 3PS that is intuitive, the most advance 3PS system I've seen still falls victim to stuttery camera/unit. I'll make a public release if i ever get around to working on it, i'd much rather see higher quality maps than be greedy with knowledge. I'm not sure how to reduce that clipping at the horizon line. It could be the limitations of the engine, but i like to believe someone will figure it out someday. You can use Fog to reduce your viewing distance, it helps a little bit (unfortunately it doesn't do much for the horizon line). I explain a little about it in the wiki page above. Start with a Fog height equal to your terrain height, and play around from there. "Fog Distance Near" is like the distance from your unit you want the fog to be cleared out, your "Fog Distance Far" must be a larger number or it'll look like you have fog coming off your unit only.

I'll try that. I was already considering jumping into the fog settings in case that would help. Would covering the Horizon line help at all? Like placing really high cliffs around the map's border? And what are some steps you're thinking of for smoother movement? Ideally, I'd like this system to be downloadable so we get some decent games going around, but unless it's a decent system, I can't see people using it.

Do share if you get a chance to test some of your experiments.

[Edit]: I made a custom texture set, but I'm not sure how to actually make the fog/skybox show up. How do I tell the game to actually display that Texture set? I set it in the Map Textures and I enabled fog and set environmental effects to on via triggers, but I still have no fog or skybox... Is it possible that my graphics settings are too low for them to appear?

I also tried the "Create Effect at Point" action that you recommended, and I realize I worded my request badly. I didn't want to create a data editor effect at a point, I wanted to create an effect like in Warcraft III. In other words, no damage or anything like that, I just want to put impact models at specified locations. Create Explosion at point works for my grenades, but the other impact models are currently a pain to get in place.
 

onisagi

New Member
Reaction score
6
Depending on the tileset used in your map it defaults to a camera type. If you had selected Braxis Alpha, i think it would've automatically been Space Platform. The other tilesets assume that you'll never be able to see through the bottoms of the terrain nor outside of the terrain area, so it just disables the skybox. Make sure your camera type is either "installation" or "Space platform" for your skybox to display correctly.

So a periodic event that deselects all units on the map will do the trick? It's really only destructible health I want to hide, I don't mind the rest. I'll give that a shot.
I think i might've misled you. Deselecting doesn't hide unit health, i was thinking about something else entirely. I know Neutral or Neutrally allied units are shown without HP, but it doesn't help what you're trying to do. I dunno how to turn off enemy hp bar, and haven't come across any method to do it yet.

I'll try the "Create Effect at Point" and see if it works. Hopefully it allows height variations...
There's another way to deal damage that i assumed you were already doing. But looking into your triggers i found that you were doing something else entirely. Here's some examples of what i mean for the created damage that can have effects editable in the data module:
Environment - Create "Ghost - Snipe (Damage)" on "target" from "your unit".
or Create "Probe - Particle Beam (Damage) on "target" from "your unit"

I am moving the marine instantly, which is why it seems so strange that he moves sideways like that. I even added in conditions that prevent him from trying to move anywhere unpassable, but it didn't seem to fix the issue.
Well i'm not sure what the problem is exactly. But if you were just moving your unit instantly it shouldn't have this problem. There's something about the other things you are doing inside your movement updating that is making that weird movement happen. Look at this map -> http://www.sc2mapster.com/maps/g-3pshooter/
He's got a similar movement triggering as you, yet he doesn't go nuts wen walking up to pathing blockers.

I haven't experimented with Boss bars yet. Can you set Icons or names to them? And can you adjust their size? I'll mess around with them a bit to find out or search for a tutorial on 'em.
As for Dialogs, how do they differ from Warcraft 3's? I just assumed it would cover the whole darn screen with button options again, which wouldn't quite achieve the effect I'm looking for.
Boss bars display stuff relative to the unit they're targeting, or at least i dunno how to change the icons on it. I usually just use custom dialogs, their size and positions can be modified, and for dialog items, you can freely add different button icons or write custom text to it. After linking a dialog item to a dialog item variable, you can update it using periodic triggers. It's quite easy to use and very customizable. There's settings to turn things invisible or transparent. There's a couple of tutorials floating around.

I've been following that too :). Outfitting him with more armour might be a pain though. I really just need a marine with a few extra animations added in.
Gotta wait until they release some sort of unit animation editor for any custom animation work.

I'll try that. I was already considering jumping into the fog settings in case that would help. Would covering the Horizon line help at all? Like placing really high cliffs around the map's border? And what are some steps you're thinking of for smoother movement? Ideally, I'd like this system to be downloadable so we get some decent games going around, but unless it's a decent system, I can't see people using it.
Actually deformed terrain might look less clipped coupled with some fog. There's also "clip" attributes inside custom camera objects (namely farclip), that blacks out stuff that are a certain distance away. Experiment a little with that to see if it helps what you wanna do.

The biggest problem most people are facing is that they can't seem to get both the unit and the camera to work well together, without introducing some major jittering. That's the main hurdle i'm focusing on for now. And then camera angles and targeting.
It would be nice if we ever get around to using custom strafe animations, and just go back to using issue-order, because using the games original movement will always be better.

As for the movement engine i was thinking about... i generally trigger or write code in a way where it's highly customizable and highly portable. It's a habit of mine, because i'm OCD about customization and being able to reuse stuff.

[Edit]: I made a custom texture set, but I'm not sure how to actually make the fog/skybox show up. How do I tell the game to actually display that Texture set? I set it in the Map Textures and I enabled fog and set environmental effects to on via triggers, but I still have no fog or skybox... Is it possible that my graphics settings are too low for them to appear?
Step-by-Step: Inside the Terrain Texture Sets, Add Object..., Copy From: an existing tileset, and customize name. Now you can go inside that new Texture set and change Field:Textures - Blend and choose which tiles you want included in the set. Go up to Field:Background model (fixed) and select your desired skybox, and Background model (not fixed) for your desired parallax model (or none). Change Camera Field to Installation or Space Platform. Then go into Map Textures... to change you map's default texture set to your newly created one. And it should work.

This map has a similar shooting implementation as what you're trying to achieve:
Top post has a download link: http://www.teamliquid.net/forum/viewmessage.php?topic_id=120957&currentpage=33

I think its just a demonstration on what he thinks is currently achievable. His left-click shooting is able to leave explosion animations on terrain as well as enemy units. Look for the trigger where he detects Left-Click.

Ultimately, this method of shooting that you're trying to implement is severely limiting because you'll always require terrain behind everything you're shooting at, or mouse click coordinates cannot be read (meaning you can't shoot something in the sky or with the skybox behind it). You'll eventually have to switch to a trace-line shooting method, which requires some galaxy programming. Implementing it shouldn't be too hard, here's a tutorial (note: i only found this tutorial, so i don't know how well this particular implementation works)
http://forums.sc2mapster.com/develo...gger-how-to-target-with-mouselook-tracelines/
 

wingdnosring

New Member
Reaction score
16
I'm going to avoid quoting since it makes our posts way too long:

That tracing is already more or less what I had going. However, I think his way might be more efficient. My way simply moves all bullets a certain amount and checks for collision every 0.03 seconds, whereas his is a simple loop. I'll look into it soon. I'm going to focus on some of these other things first.

I looked at the map for the awkward turning around objects, but his code looks the exact same as mine. Move unit instantly to his current point offset by x towards y. I'm really not sure why mine behaves differently. I'll have to look into it a little more. The FPS/3PS you linked me to has the same problem as I do though.

I've managed to create impact actors at the points of impact without a problem, but I can't remove the actors after the fact. I don't see any way to remove an actor without putting it in a scope (and I just don't get Actor Scopes yet...).

And thanks, the 'Default Camera' setting was the cause of the skybox issues. There is now a sky :). The fog is still giving me a problem though. I can see it fine in the editor, but it's simply not there when the game starts.

And finally, the dialog suggestion worked perfectly!
 

onisagi

New Member
Reaction score
6
i think the awkward turning has something to do with the behaviors that you added to your unit, haven't really have time to study your triggers deeply, but that's the only difference i see between your implementation and the other guy's.

For actor scopes, you can either create one on the fly and use it by refering to the "last created actor scope" function when you create your actors.

Alternative is you can create a new variable ahead of time of type "actor scope" and set yur newly created actors to it when you create the actors (but reusing the same actor scope will likely result in premature killing of actors that are just created). So this is just for reference in case you wanted to do something else with "actor scopes".

see if you can figure out how the other guy handles impact actors, i remember skimming the triggers awhile ago and saw that he creates a probe and kills it immediately, for that that bluish explosion effect.

For the fog, go to Data Module -> Terrain Texture Sets -> Your texture set -> Fog Starting Height

make sure the value is equal to or higher than your terrain height. or else the fog will be underground and too faint to be seen by the time it travels above ground.

setting the fog values depends on your camera view. First you wanna set the fog starting height to even see it. If my fog density is high enough i might be able to see it if "Fog Starting Height" = height of the terrain im standing on (mouse over the terrain in terrain editor and you'll see the terrain height as the third number on the bottom left corner).

When you wanna start having the fog thin out a certain radius around your camera you apply the following values:
Fog Distance Falloff: play with this number to make the fog blend better, large numbers creates a solid looking fog wall that stuff disapears behind instantly, smaller numbers allow stuff to disapear slowly over distance.
Fog Distance Far: distance you want fog to start getting thicker
Fog Distance Near: distance from your camera you want thinned fog (with the area at the center of your camera position being the least foggy)

if it fits your shooter's theme to use fog, fog works better than the "farclip" option (inside cameras, changeable using triggers) that people have been using for other maps, because farclip actually makes the skybox disapear too. I think the best way to make the map less laggy and more graphically viable is to make sure there is never an area where you can see the whole map, meaning lots of deformed terrain (long expanses should be either going on an incline or decline, because if its flat land you're gonna see things from miles away). And make sure to surround the outer regions of your map with path blockers to prevent players from traveling too far and seeing weird parts of the skybox that is underneath the terrain.

Also last time i said i didnt know how to remove the black line at the horizon, i've since noticed that it's just the camera boundary's edge. To get rid of it you must either lower the terrain height in a border around the whole map, or use a lower cliff level surrounding the whole map. Basically hiding the black edge of the terrain underneath a hill/cliff, the edges of your map will look alot better. The alternative is to make unpathable mountains surrounding your map that will hide the edge.

There's alot of potential for dialogs/dialog items for creating your own GUI.

Also might i recommend adding in a map initialization trigger and set your cameras ahead of time, so you don't have that 1 second period where your camera view is looking down at a corner from far away. It may seem redundant since yu update your camera later, but map initialization triggers are very low resource since it only runs once, doesn't hurt to have that extra aesthetics. And the speed in which you update your camera/unit can be faster to reduce stutter. Just type 0 for the durations, it'll automatically update at the fastest speed possible.
 

wingdnosring

New Member
Reaction score
16
Sorry I haven't been updating the last few days, guys. I've been working on a system upgrade that went awry. Ohhh, windows....

Anyway, I should be up and running again soon.

The fog is bizarre because I can see it perfectly in the editor. I can set the effects and see the difference with each change I make, but when I load the actual game, it all vanishes. I experimented with the far clip settings, but decided against its use since it renders skyboxes completely obsolete. It helps for lag, but it looks terrible.

I can't see behaviors being an issue, because my marine has standard behaviors. The only things I've changed are removing the attack ability, and altering the fidget values. Weird.

Last I had access to a computer I was *attempting* to get my grenades flowing into proper parabolic curves. Clearly I've been neglecting my math skills recently, because after three hours of figuring out a formula and whatnot, the missile now goes straight. YAY for vertex form...
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
The fog is bizarre because I can see it perfectly in the editor. I can set the effects and see the difference with each change I make, but when I load the actual game, it all vanishes. I experimented with the far clip settings, but decided against its use since it renders skyboxes completely obsolete. It helps for lag, but it looks terrible.

Might be your graphics settings if not set high enough... If not, that's weird.
 

wingdnosring

New Member
Reaction score
16
That's what I thought too. I tried raising my settings and still didn't see it. Again...weird. I can't wait to jump back on there and mess around with stuff once these computer issues are sorted out :).

For actor scopes, you can either create one on the fly and use it by refering to the "last created actor scope" function when you create your actors.

Alternative is you can create a new variable ahead of time of type "actor scope" and set yur newly created actors to it when you create the actors (but reusing the same actor scope will likely result in premature killing of actors that are just created). So this is just for reference in case you wanted to do something else with "actor scopes".

see if you can figure out how the other guy handles impact actors, i remember skimming the triggers awhile ago and saw that he creates a probe and kills it immediately, for that that bluish explosion effect.

Oh well...back to quoting. I'm still not sure how this would work. So I would create an actor scope, create my actor at point, add last created actor to last created scope, and then kill all actors in scope? That seems like a pain :(. I'm all for trying it though. The problem with using units, as you can see in the currently posted version, is the height change times. Changing the height of a dummy unit takes longer than the effect of bullets hitting walls, units, etc; So the effect ends up getting spread through the air on the way down to the target height, rather than concentrated in its proper place. Actors are nice because you can create them at a set height, so they are in the proper position instantaneously. I suppose if I could reliably freeze an effect unit's animation until it was in place, that could work, but actors just seem easier, provided I can remove them properly.

Speaking of removal, do "play sound at point" actions need to be removed in some way? It seems weird to just create them and let them sit...

And finally, are you sure the intervals for camera movement can be lessened? That won't cause even more lag? It'll be smoother, but if it lags horrendously, it's not much of a fix...I have all my movement actions and whatnot tied up in the same trigger, so I guess I would have to seperate them.
 

onisagi

New Member
Reaction score
6
set ur fog density higher and set starting height higher to see if u can see it...

Also you're using physics on yur nades? Just have it look at your camera's pitch angle, which you should transform to "pitch = 360 - camera pitch", because the camera's pitch is inverted where going down from the horizontal into the ground is actually positive angles, and looking up is negative. Take this pitch and use it to calculate Z and XY component velocities of yur grenade projectile, then use camera yaw angle to calculate X and Y components from XY vector. Keep in mind the Z velocity decreases by a gravity constant over time. And stop everything when it hits terrain.

do something like this to simplify calculations, you're not running an actual real-life simulation:

Set initial grenade velocity vector, Vxyz
Vz = Vxyz*sin(pitch)
Vxy = Vxyz*cos(pitch) <-- step can be skipped by simplification in Vx and Vy
Vx = Vxy*cos(yaw)
Vy= Vxy*sin(yaw)

X = Xi + Vx
Y = Yi + Vy
Vz = Vzi - g
Z = Zi + Vz

Vx and Vy are constant, unless yu add in wind resistance. Only Vz gets "updated" because gravity is constantly changing it.

the Xi,Zi,Vzi means the previous value that was stored in X,Z,Vz. You can trigger that using arithmetic (real) and set var1 = var1 + var2

When this is done, you use it by creating a grenade at your unit, initialize x,y,z at its position, then let the algorithm take over on calculating its flight path, and exploding and creating aoe damage at its landing position.

hope that helps, i havent tested... but it works in my head... xD. For some reason, i cant help but feel you can do this alot easier using effects and models, like... marauder's throw grenades... can't yu just add splash damage to it? My method would be more versatile tho... cuz yu can literally plant yur nades anywhere within yur throwing range (controlled by your Vxyz magnitude, which can be changed on the fly for things like making yu throw farther while running, or after Stim).

Hope you successfully implement it. I've been too lazy to do this stuff myself.
 

wingdnosring

New Member
Reaction score
16
Lol. Believe me when I say that I appreciate your laziness hasn't prevented you form helping others...namely me :).

Set initial grenade velocity vector, Vxyz
Vz = Vxyz*sin(pitch)
Vxy = Vxyz*cos(pitch) <-- step can be skipped by simplification in Vx and Vy
Vx = Vxy*cos(yaw)
Vy= Vxy*sin(yaw)

X = Xi + Vx
Y = Yi + Vy
Vz = Vzi - g
Z = Zi + Vz

I have no idea how to implement that. I don't mind telling you that math was never my strongest skill, and I don't recall learning about vectors at all :S.

Here's what I have so far for trajectory calculations:

Code:
Unit - Set (Last created unit) custom value 0 to Grenade Traj Distance
Unit - Set (Last created unit) custom value 1 to 0.0
Unit - Set (Last created unit) custom value 2 to 0.0
Unit - Set (Last created unit) custom value 4 to (Grenade Traj Distance * (Grenade Traj Distance / 0.06))
Unit - Set (Last created unit) custom value 3 to (((Ground height at Shooter Positions[Grenade Traj Creation Loop]) + 0.6) + ((((Custom value 4 of (Last created unit)) * (0.0 - (Sin((Camera Pitch of Player(Grenade Traj Creation Loop)))))) / (90.0 + (Sin((Camera Pitch of Player(Grenade Traj Creation Loop)))))))
Unit - Set (Last created unit) custom value 5 to (((0.6 + (Air height at Shooter Positions[Grenade Traj Creation Loop])) - (Custom value 3 of (Last created unit))) / (Power((0.0 - (Custom value 4 of (Last created unit))), 2.0)))

Grenade Traj Creation Loop is simply an integer that loops for the values 1 to 14. Essentially, it's just a player number.

Then this is how I set their height every 0.03 seconds:

Code:
Unit - Set (Picked unit) custom value 1 to (((-1.0 * (Custom value 5 of (Picked unit))) * (Power(((Custom value 2 of (Picked unit)) - (Custom value 4 of (Picked unit))), 2.0))) + (Custom value 3 of (Picked unit)))
Unit - Change (Picked unit) height to (Custom value 1 of (Picked unit)) over 0.03 seconds

The problem lies in two areas: Custom Value 3 and Custom Value 5. 3 is accurate for detecting height, but it changes the vertex very little. 5 is consistently 0.00(something), which the editor just rounds down to zero, thus giving me no curve whatsoever. So I have to:

-Fix up custom value 5 so that it doesn't constantly return zero (no idea what I'm doing wrong here)
-Adjust custom value 3 to better represent the player's camera angle

[Edit]: Turns out my numerical craziness was correct. The problem was that custom values can't be negative numbers.
 

onisagi

New Member
Reaction score
6
it would help to post what you're using each custom value for? The way you're changing some of those values isn't making sense to me.

Vectors are just multi-dimensional arrays of values. Like in 2D coordinates would be in (x,y) form, but 3D it's in (x,y,z). When you're throwing something in real life, you apply a force on the ball and when it leaves your hand you can imagine that you just set the ball's initial velocity. Velocity is directional, so what you really did was set the ball's initial speed in all x,y,z directions, aka the velocity vector v(x,y,z) = Vxyz.

Then you just separate the components to find the velocities in each axis so you can do manipulations. And calculate position with it.

But like i said, if you've noticed the pitch angles the game uses makes very little sense to what you're doing. If you readout the pitch angle ingame, you'll see that aiming your mouse upwards into the air at an angle of about 45 degrees results in something like 315 degrees for your pitch angle output. Which is kinda weird when you look from the ground up, so i would have actual pitch = 360 - camera pitch, to have it make more sense.

It can be tedious, but if you're really bent on using custom values, you can work around that limitation by offsetting the value to like +256 first. "Pretend" 256 is your new zero point. Then when you need to use the value in calculations you remove the offset first, and put it back wen yu need to update it. Can even write a function that does this automatically.

Or you can just create global variables that are 2 dimensional, using one of the indices to store player number, and the other to store the necessary value.

In a test map of mines, my player velocities are set in a 2 dimensional array.
EX: Player Vxyz = [8][3]
for 0->7 Players, and 3 velocities Vx,Vy,Vz for ther respective axis. Where for the 2nd index: X = 0, Y = 1, Z = 2. So,
Player Vxyz[1][0] = player 1's x velocity
Player Vxyz[1][1] = player 1's y velocity
Player Vxyz[1][2] = player 1's z velocity
 

onisagi

New Member
Reaction score
6
Guess what this action is for?

Set unit state
unit: your unit
state: status bar
value: off
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top