[VJASS]Advance Camera , Keyboard And Movement System

User avatar
Enalias
Site Admin
Site Admin
Posts: 200
Joined: Sat Sep 15, 2018 1:57 pm
Reputation: 9
Location: Florida, U.S.A.
Website: http://chaosrealm.co/memberlist.php?mod ... rofile&u=2
Discord: https://discord.gg/BUEZkef
Twitch: https://www.twitch.tv/enalias
Contact:
United States of America

[VJASS]Advance Camera , Keyboard And Movement System

#1

Post by Enalias » Mon Nov 05, 2018 11:51 am

Credits : The Witcher



The Camera System
The camera system is basicly a system that adjusts the camera distance, height and angle.
This prevents the camera from going through doodads or blocking your view when you walk away from them or even up a hill...
Well its MPI and easy to handle!
Read the beginning of the code to see the included functions!
The important values are changeable ingame AND NOW FOR EACH PLAYER SEPERATELY!!

But what makes this system advanced?
In contrast to many other camera systems this one isn't interrupted by items or units standing in your way. It adjusts the zAngle, too, but not like 'bamm' and the new angle is there!! It's smooth and lagg free!!!

The Keyboard System
nothing new but VERY useful as i think...
always when you want to create a effective arrow key movement system or a sniper system or anything else using the arrow keys you need to create 8 triggers: 4 for the key press event and 4 for the key release event.
this system just brings you these triggers, merged and optimized.
now you don't need 8 triggers you just need 1.
You have a function to check whether key xy is pressed.
in addition you have the power to register double press events to triggers.
they will fire when key xy is pressed twice within 0.5 seconds (adjustable).

The Arrow Key Movement System
nothing new, too, but useful, lagg free, MPI and it features custom plugins!
It has the basic functions of each arrow key system:
Up = move towards facing
Down = walk backwards
Left = turn left
Right = turn right
BUT my system doesn't collide with walls, it slides along them!
it is fully MPI so each player can control one unit, even if he doesn't own that unit!
And as i haven't seen this in any movement system before:
when a unit walks backwards it's animation is played reversed, too, so it doesn't look crappy :D Even flying units are supported!!

In addition everyone can expand this system by coding own plugins!!
For this test map I created the following ones:
Double Up press = dash foreward
Double Down Press = turn 180° around
Double Left or Right press = move in that direction without changing the facing angle...

check out the how to's in the test map to create your own plugins!


The test map uses all systems by giving you arrow key movement control over a soldier walking around in a small but lovely village.
To test the zAngle feature please walk outside the village where the hills begin :D

I was asked why i placed items there, because your unit can't pickup items...
Well other systems collide with items and count them as a wall!
My doesn't... it ignores them ;D

you need JNGP and some JASS knowledge to get this code working correctly
You do not have the required permissions to view the files attached to this post.

Return to “Systems”

×