This is my first post, and it's my first engine I've put together using the SC2 editor :)
I thought I'd contribute to the map development section and share this with those who either do not have the knowledge, or time, to develop their own TPS engine.
It took me a couple of days to actually make the engine work properly, and it's a pretty basic, but decent, third person shooter engine.
Controls
Movement: WASD keys.
Shoot: Left Mouse button.
Zoom: Right Mouse button.
Reload: R key.
Flashlight: F key.
YouTube demo-video
Implement the engine into your own map
Download the library from the attached files.
Open up your map.
Open the Trigger Editor.
Click on View -> Show Libraries.
Right click on the library field, select Library -> Import Library and choose the TPS Engine Library.
Open the Data Editor, choose to filter Cameras and choose Default Camera.
Delete all the zoom levels for the camera.
Open the Trigger Editor and make sure you set the PlayerUnit variable to your main unit.
If you want to be able to use the flashlight, go to File -> Dependencies, and press Add Standard and check Liberty (Campaign).
Lastly, make sure you set the custom value 0 of every enemy unit that you're going to have on your map (owned by player 15 in this case) to the height of the unit (you'll have to play around with values here, since there's no way to otherwise get that information of a unit).
That should be it. It should now work with your own map!
Now it's just a matter of tweaking for your own liking.
Note: A lot of people experience loss of trigger and variable names (seems to output: Syntax error at line 21) when implementing the engine or opening the map. I have no solution for it, and I don't even know what's causing it - it might be the localization that messes things up.
Final words
Feel free to use the engine in any map you make :)
This is a very impressive engine. Probably the best I have seen so far. I find the demo map oddly addicting. :D
The only flaw i really noticed, though I did not test for very long, is that the unit lifts the barrel of his gun back up if you hold zoom for more than a couple seconds. This is merely cosmetic though.
Yes, there are minor animation problems. They are specific for the unit, though. One could solve the problems by choosing another unit, perhaps a custom one, or try to manipulate the animations using triggers. I also see this as a flaw, but nothing that can't be solved.
there is a way to stop the lag make fog of war[edit: BLACK AND NOT SEE THOUGH] so the game wont need to look far away meening make a ring around the player to stop him from seeing far away the more area you look at the more it lags [yes this works]
Are you really talking about latency delay here?
Because I can't see how this would affect the latency at all, since (I guess) the fog-of-war isn't server-side, but client-side.
i have seen how texture in terrain does infact make the game lagy online it does with every game try it and see have the fog of war be pitch black and lower seeing distance and you will understand realy it works
you shoul make it a 4 man survive the waves map with a sniper, marine, medic and flamethrower guy
medic should have heal is left click and shoot a crappy pistol as right click , while the others have shoot and zoom
About the survival suggestion: It's very much doable, but not without the lag that's been infesting every multiplayer TPS map :(
I'm at a point where I'm unsure if I actually want to make a real TPS map, seeing it won't be playable online (at least for the time being). I could try to make a fun TPS singleplayer Outpost Defense though - shouldn't be that hard. The only sad thing is that singleplayer maps don't last for long.
I want to start a larger map project, I just want to get a nice and doable concept first.
I've already customized the engine (not uploaded anywhere) to handle 2 players, to actually see how bad the lag was on B.net.
So if you want, I could upload the multiplayer engine as well.
If you want to play as a Marine, just change the Ghost unit that's been placed on the map into a Marine unit (don't forget to set the PlayerUnit variable to the Marine instead), and edit the Shoot trigger to execute Gauss Rifle instead of Canister Rifle.
EDIT: You could lower the AttackCooldown variable significantly and change the Shoot trigger to fire projectiles even when holding down the button (so you don't have to click all the time), if you want a more "real" machine gun.
yea please can you upload the multiplayer engine :D
me and a mate is going to learn how to make sc2 maps and liked the single player engine and want to try a multiplayer one
If you want to play as a Marine, just change the Ghost unit that's been placed on the map into a Marine unit (don't forget to set the PlayerUnit variable to the Marine instead), and edit the Shoot trigger to execute Gauss Rifle instead of Canister Rifle.
EDIT: You could lower the AttackCooldown variable significantly and change the Shoot trigger to fire projectiles even when holding down the button (so you don't have to click all the time), if you want a more "real" machine gun.
I've updated the original post with the download link for the multiplayer map file.
If you want to make a machine gun effect, you could make a periodic event where it checked if you are holding down the Left Mouse Button;
- Create a variable called "Shooting", or something like that, and make it a boolean (set to false as default).
- Create a trigger that checks for key presses and check for Left Mouse Button (pressed down), and set the variable "Shooting" to true.
- Do the same with a trigger that checks for when Left Mouse Button is being pressed up, and set the variable to false.
- Create a trigger with the Periodic Timing event (set it to...like...every 0.01 seconds - decide for yourself what you think is appropriate in your case), and check if the variable "Shooting" is true - if it's true, then make your unit execute Canister Rifle (Damage) or whatever weapon effect you want to use.
This is at least how I would've begun if I wanted to make a machine gun, but perhaps there are better and smoother ways to do it.
I have not tested it yet. Does this use a traceline or just shoot missiles? If its a traceline, I would love to implement this into my own TPS map Im currently working on.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
To post a comment, please login or register a new account.
Third Person Shooter Engine
Introduction
This is my first post, and it's my first engine I've put together using the SC2 editor :)
I thought I'd contribute to the map development section and share this with those who either do not have the knowledge, or time, to develop their own TPS engine.
It took me a couple of days to actually make the engine work properly, and it's a pretty basic, but decent, third person shooter engine.
Controls
YouTube demo-video
Implement the engine into your own map
That should be it. It should now work with your own map!
Now it's just a matter of tweaking for your own liking.
Note: A lot of people experience loss of trigger and variable names (seems to output: Syntax error at line 21) when implementing the engine or opening the map. I have no solution for it, and I don't even know what's causing it - it might be the localization that messes things up.
Final words
Feel free to use the engine in any map you make :)
If I shoot something, will it deal damage?
What do you mean by "it"? If you shoot a unit, that unit will take damage and it will die if you keep shooting.
@martinolsson: Go
This is a very impressive engine. Probably the best I have seen so far. I find the demo map oddly addicting. :D
The only flaw i really noticed, though I did not test for very long, is that the unit lifts the barrel of his gun back up if you hold zoom for more than a couple seconds. This is merely cosmetic though.
Overall, I am very impressed. Excellent work.
@Galois1: Go
You should probably test the attached map and find out. : P
Thank you ^^
@Airolden:
Yes, there are minor animation problems. They are specific for the unit, though. One could solve the problems by choosing another unit, perhaps a custom one, or try to manipulate the animations using triggers. I also see this as a flaw, but nothing that can't be solved.
I'm glad you all like it ^^
there is a way to stop the lag make fog of war[edit: BLACK AND NOT SEE THOUGH] so the game wont need to look far away meening make a ring around the player to stop him from seeing far away the more area you look at the more it lags [yes this works]
@chaosjones17:
Are you really talking about latency delay here?
Because I can't see how this would affect the latency at all, since (I guess) the fog-of-war isn't server-side, but client-side.
i have seen how texture in terrain does infact make the game lagy online it does with every game try it and see have the fog of war be pitch black and lower seeing distance and you will understand realy it works
@chaosjones17:
I'll take your word for it :)
Gonna give it a try!
EDIT: Did not work, as I suspected. The fog-of-war and terrain sight distance are client-side.
And i though i got a smooth camera ... you got my respect for this work
thx
you shoul make it a 4 man survive the waves map with a sniper, marine, medic and flamethrower guy medic should have heal is left click and shoot a crappy pistol as right click , while the others have shoot and zoom
I like your coding, very clean :)
Thanks for your responses :) Much appreciated!
About the survival suggestion: It's very much doable, but not without the lag that's been infesting every multiplayer TPS map :(
I'm at a point where I'm unsure if I actually want to make a real TPS map, seeing it won't be playable online (at least for the time being). I could try to make a fun TPS singleplayer Outpost Defense though - shouldn't be that hard. The only sad thing is that singleplayer maps don't last for long.
I want to start a larger map project, I just want to get a nice and doable concept first.
but how do u add other playable characters so u can make a multiplayer map? and how can u add marine that uses a machine gun?
I've already customized the engine (not uploaded anywhere) to handle 2 players, to actually see how bad the lag was on B.net.
So if you want, I could upload the multiplayer engine as well.
If you want to play as a Marine, just change the Ghost unit that's been placed on the map into a Marine unit (don't forget to set the PlayerUnit variable to the Marine instead), and edit the Shoot trigger to execute Gauss Rifle instead of Canister Rifle.
EDIT: You could lower the AttackCooldown variable significantly and change the Shoot trigger to fire projectiles even when holding down the button (so you don't have to click all the time), if you want a more "real" machine gun.
yea please can you upload the multiplayer engine :D me and a mate is going to learn how to make sc2 maps and liked the single player engine and want to try a multiplayer one
how do you do that? :D
@thomalk:
I've updated the original post with the download link for the multiplayer map file.
If you want to make a machine gun effect, you could make a periodic event where it checked if you are holding down the Left Mouse Button;
- Create a variable called "Shooting", or something like that, and make it a boolean (set to false as default).
- Create a trigger that checks for key presses and check for Left Mouse Button (pressed down), and set the variable "Shooting" to true.
- Do the same with a trigger that checks for when Left Mouse Button is being pressed up, and set the variable to false.
- Create a trigger with the Periodic Timing event (set it to...like...every 0.01 seconds - decide for yourself what you think is appropriate in your case), and check if the variable "Shooting" is true - if it's true, then make your unit execute Canister Rifle (Damage) or whatever weapon effect you want to use.
This is at least how I would've begun if I wanted to make a machine gun, but perhaps there are better and smoother ways to do it.
I have not tested it yet. Does this use a traceline or just shoot missiles? If its a traceline, I would love to implement this into my own TPS map Im currently working on.