3PShooter
This is just a simple Third-Person over-the-shoulder camera system with a working bullet system.
This is just for demo purposes so feel free to steal some code, a lot of the idea were stolen from various forums and put together here. Please leave any suggestions / requests.
Note: I will not be updating this unless specifically asked to change something.
no longer working it would seem. if I'm wrong i'm sorry but it seems about 3 triggers need updating.
UPdate: I found out its a error with the Camera Update trigger, for some reason it is causing sc2 to crash in my map but not yours.
Hi, copied your code and have been playing around with my own map thats basically the same thing, however every time i kill a zergling the game freezes. However on your map this does not happen at all. DO you have any suggestions?
Heres a link to my map:
http://www.sc2mapster.com/maps/test3pmap/files/1-3pshootertest/
That's what I'm hoping >_<
Creating smooth wasd movement isn't a problem, the hitch comes in trying to make it appear smooth when constantly changing the yaw of the camera, as of right now, any panning animation cancels out camera yaw, so you need to make pans instant, and that creates a stuttering effect. Camera Bounding for now is a smoother option, although still not good enough to consider it smooth, but I expect Blizzard to modify the way a camera is panned or locked to a location in the near future to allow for smooth camera following a moving unit.
Heh, I'll take a look at that link later - I've got a lot of homework that I didn't do.
New version is basically fully functioning... You can add and affect to units that are hit! Height is working as well.
Interesting so you basically coded in your own bullets and collision with triggers. its not world of starcraft, its here: http://www.sc2mapster.com/maps/complex-topdown-wasd-movement/
But yeah this is for top down, so idk how much code here is usefull but it sure is the smoothest movement i have seen yet with WASD.
Codes all up stealing, go for it.
I'll look into why I've got more stuttering, I think it's because I change my unit's moving method...
I took a look at that Smoother WASD movement for the "World of Starcraft" project, but he's using Pan Camera which is as of now, not compatible with the mouse D:
I'm not using the data at all really. The "Weapon" is fully triggered (besides model). As soon as I get collision working for the weapon (you'know correctly hitting units), I'll work on multiple weapons. I could do it if I could figure out how to get the custom function + arguments to work.
Well if you get more stuff done with the system maybe I can implement the game then give you the map so you could upload it on the database and still be its author =D. Have lots of time to work on terrain, and data editor. I can do basic triggering but the camera stuff confuses me. I also have a lot 3d modeling experience(made maps for quake 3, models for 3ds max etc) if you wanted to replace the models in game, Ive never textured one though.
In your current update, the movement seems to lag behind the camera smoothness. Its like the opposite of most games ha ha. Also you should try to code a complex WASD control, 8 directional. W+D = top right, WA = Top left, AWD = forward, AS = bottem left, SD = bottem right, ASD = backwards. This would be the next step if your looking for more challenging movement system. There is another map on here called like smoother WASD movement. Its top down no camera or any mouse control but the movement with wasd is smoother then any other map out, that code i think is free too look at but you will have to change some stuff to make it strafe instead of just run in a direction.
Oh also for weapon changing, what if you made a variable that edited the data sheet in real time. So when you hit E it changes the data sheet for the marine with this weapon in game. When I hit it again it toggles it to another data sheet with a different weapon. But I can barely get unit ordering after spawning to work so this may be impossible.
Another way would be look at the Viking, it has 2 weapons one for on ground mode and one for in air mode, if you just made it a toggleable skill that changed your weapon like the viking unit in SC2 but then change it so they are both ground weapons. But the thing is that unit also goes between ground and air and that's probably the restriction on whether the weapon is in use or not.
@RailTracer
I got some of the camera code through experimentation, and a lot - especially the idea of bounding the camera - from the post:
http://forums.sc2mapster.com/development/tutorials/425-trigger-3rd-person-movement/#posts
The bullets in the second release do not do damage yet, they did in the first release due to baneling explosion. My next goal is collision detection with units and damaging only units at the right heights.
I haven't seen the code from that video, but it looks better than mine =(
Thanks for the compliments
@Sepir
Thanks for downloading!
I don't have any current plans to release an actual game (just a system), but we'll see when school ends and summer rolls about. My current limiting factor to multiple weapons is not being able to call function; I'm not sure if they're not implemented or I'm doing something wrong.
Just downloaded it. Wow it is awesome.
Perhaps a future release could have some sort of 4v4 combat or capture the flag type of thing? Maybe some different characters with different weapons and abilities.
Wow forgot to say smoothest camera ive seen yet. Is this the same code from this video by any chance?
http://www.youtube.com/user/Xusilak#p/a/u/1/ZFHaGzTflkc
There is other maps out there already with WASD strafing if you are feeling lazy =D. Also wondering if the bullets do actual dmg, is it splash? When publishing comes out you should make this into a MP third person shooter. I would definitely play it! If you need any cool terrain done or anything, let me know. You can check out my map to see my work =D.
Also noticed a bug when you constantly shoot and get close to the explosions it starts to do a quake 3 thing of repeating images except in black lol probably because of so many explosions.