• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Advanced Camera, Keyboard & Movement System by The_Witcher

Level 3
Joined
Jun 30, 2011
Messages
17
Hello everyone.
After MANY problems with the Advanced Camera, Keyboard & Movement System
by The_Witcher system features here on the Hive, I've finally dedicated some time to explain this.

I will be explaining and showing you the following things.

• Multiplayer System

• How to set the camera and movement for a player

• How to remove the camera and keyboard for a player

Difficulty: 3/10


Multiplayer

First of all, you need to copy the variable "u". It is important, and as you can see in the test map of the system, it is used to specify the Captain.
Now, if you copy it 4 times, like u2, u3, u4, u5, you will be able to specify it for many players.

attachment.php



How to set the camera and movement
In this part we will apply the movement system for the players you want.

A few custom scripts are required.

attachment.php


This is what I made in an old map I was working on.

JASS:
call SetCameraUnit(udg_u, Player(Number))

Numbers are the following.

0 = Red [1]
1 = Blue [2]
2 = Teal [3]
3 = Purple [4]
4 = Yellow [5]
5 = Orange [6]
6 = Green [7]
7 = Pink [8]
8 = Gray [9]
9 = Light Blue [10]
10 = Dark Green [11]
11 = Brown [12]

Same thing to set the keyboard system. You can just copy the script above or follow this template:

JASS:
call SetCameraUnit(udg_u, Player(Number),6)

I must say the truth. I haven't still noticed what 6 is. But I'm really sure it's the animation index. In my map :)P) when you use arrows to move it plays Stand Ready, which is the 6th animation of the model I'm using.


How to remove the camera and movement for a player

attachment.php


This is from the SotDRP map I'm making.
As you can see, it doesn't need ReleaseMovementUnit, since The_Witcher felt like not worth it. The custom code:

JASS:
call ReleaseCameraUnit(Player(0))

Will remove both SetCameraUnit and SetMovementUnit.


It's really easy, it just needed some time to figure out all the functions!

Happy mapping!
 

Attachments

  • Screen01.png
    Screen01.png
    1.8 KB · Views: 1,455
  • Screen02.png
    Screen02.png
    8.5 KB · Views: 1,524
  • Screen03.png
    Screen03.png
    36.8 KB · Views: 1,625
Level 3
Joined
Jun 30, 2011
Messages
17
Oh no, what will we do now?! HOLY SHIT! But I heard u liek mudkipz?

Better doing long and easy things that even a noob could make (Like me :p) than makin' it a lil bit more advanced where noobs would just say "Lolz wat he said is it smthin to eat???'?!1"

OMG RLY WILL THE WORLD IMPLODE
 
Top