Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Player movement with WASD

RazielLewachRazielLewach Member Posts: 20
Gather, crazy players that wanted, wants or will want to move your character with WASD keys! Gather and enjoy the pleasure!

Jokes aside (?) I wanted to play moving my char with WASD from the start. Now, after 80h, random reading topics, I saw someone say the same. And I tried now that I have more knowledge and... IT's POSSIBLE. Maybe. We need to try.

Someone managed to make this? Someone can bring some insight? Here my stuff.

With Near Infinity, create an script (BCS), attach the script to an item effect with the option AI SCRIPT (82), select the SCRIPT.BCS as resource, 100% probability, self, permanent... ENJOY!!!

The code.

IF HotKey(W) HotKey(D) THEN RESPONSE #100 MoveToOffset([1.-1]) END
IF HotKey(W) HotKey(A) THEN RESPONSE #100 MoveToOffset([-1.-1]) END
IF HotKey(S) HotKey(D) THEN RESPONSE #100 MoveToOffset([1.1]) END
IF HotKey(S) HotKey(A) THEN RESPONSE #100 MoveToOffset([-1.1]) END

IF HotKey(W) !HotKey(D) !HotKey(A) THEN RESPONSE #100 MoveToOffset([0.-1]) END
IF HotKey(S) !HotKey(D) !HotKey(A) THEN RESPONSE #100 MoveToOffset([0.1]) END
IF HotKey(D) !HotKey(W) !HotKey(S) THEN RESPONSE #100 MoveToOffset([1.0]) END
IF HotKey(A) !HotKey(W) !HotKey(S) THEN RESPONSE #100 MoveToOffset([-1.0]) END

With this, I tested and I could move my character with WASD.

The problem? It only triggered each second. So it moved 1 position, waited 1 second, moved, waited... With the key pressed, it only moved every 1 second. I put "Instant-Permanent" at the settings and Absolute Duration. Did not work. Anyone interested in achieving this can bring some insight? I won't be able to continue this until tomorrow.

Also, auto-centered camera would be necessary. More coding here.

THIS IS POSSIBLE! This have to be possible.

If you question. I play multiplayer, mi partner moves 5 chars, and I move my char, so this helps me a lot. We like to play this way, don't judge. This could also work moving an entire party? Who knows. For soloplay, or multiplayer where u move 1 char, works.

ChroniclerleeuxOlvynChuruQuartzJuliusBorisov

Comments

  • ALIENALIEN Member Posts: 904
    Dennis 'Thresh' Fong would be proud :D

  • RazielLewachRazielLewach Member Posts: 20
    edited September 5
    Thanks! I tried the script and I see what are u trying to do (I thinki). We cannot avoid the 1 second delay, so put a long movement so it continues moving and simulates precise input.

    I thought that too but... At practice doesn't work xD

    I'm surrending for this. If you cannot avoid the 1 second delay, and timers cannot avoid the delay (minimum 1 second), then you cannot have a fluid movement. At least I'll try to make an auto-moving centered camera with this, but it's sad T_T

    EDIT: Auto centered camera failed. Stops the movement...

    Post edited by RazielLewach on
Sign In or Register to comment.