Author Topic:  Force Input Script Command  (Read 319 times)

0 Members and 1 Guest are viewing this topic.

PWRBTTN

  • Legendary Member
  • *****
  • Posts: 1172
  • Professional Expert, Comrade
  • Awards Awarded to exemplary forum members 2 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: PWRBTTN
  • Steam: PWRBTTN
Force Input Script Command
« on: February 20, 2018, 07:50:04 PM »
Bam! Double-barreled idea making!

Force Input script command.
A command that forces an input to be activated. Perhaps you use it to keep a certain slot on the hotbar selected.

It could look something like this...

ForceInput [Player|Global] [Input|NoInput] [ShortTap|LongTap|Duration]
Player|Global
Player: activates the input only for the player the script was ran for.
Global: all players receive the same input. This could be applied in interesting ways. Perhaps syncing player movement together for anything from RPG effects to simultaneous cinematic shots.

Input|NoInput:
Input: forces an input to be activated for the decided duration. If no duration is specified, defaults to short tap.
NoInput: temporarily prevents a player from activating a key. If used, [duration] is required, and must be specified.

ShortTap|LongTap|Duration:
ShortTap: activates the desired input for the duration of a short tap.
LongTap: activates the desired input for the duration of s long tap.
Duration: enter a number. Input is activated for that length of time in milliseconds.

This could be a powerful tool for anything from cinematic purposes, narrative in-game cutscenes, to forcing a player to move as if under a spell, or whatever.

If you like this idea, take a look at this related one that would make a great combo together: http://totalminerforums.net/index.php?topic=19402.0
/snail       /snail    /snail         /snail /snail      /snail   /snail                /snail        

Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: Force Input Script Command
« Reply #1 on: February 20, 2018, 08:23:03 PM »
I want this. Like, A lot. Wanna know why?

This allows me to do in some kinda hacky way two things I have always wanted to do.

1: Disable double jump.
2: Add momentum to jumping so that you can't move around in midair like a weirdo.

One minor thing, I think that forcing movement should be a 3D vector and not be clamped to the player's max speed. This allows you to both do the normal thing of moving the player like they are moving normally, But it also allows you to do cooler things, Like making a hangglider script that allows you to glide in the direction you are looking.


This could also be used to simulate strong winds and all sorts of things by not disabling movement input and adding movement input in a certain direction.

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

PWRBTTN

  • Legendary Member
  • *****
  • Posts: 1172
  • Professional Expert, Comrade
  • Awards Awarded to exemplary forum members 2 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: PWRBTTN
  • Steam: PWRBTTN
Re: Force Input Script Command
« Reply #2 on: February 20, 2018, 08:43:03 PM »
I want this. Like, A lot. Wanna know why?

This allows me to do in some kinda hacky way two things I have always wanted to do.

1: Disable double jump.
2: Add momentum to jumping so that you can't move around in midair like a weirdo.

One minor thing, I think that forcing movement should be a 3D vector and not be clamped to the player's max speed. This allows you to both do the normal thing of moving the player like they are moving normally, But it also allows you to do cooler things, Like making a hangglider script that allows you to glide in the direction you are looking.


This could also be used to simulate strong winds and all sorts of things by not disabling movement input and adding movement input in a certain direction.
I hadn't thought about some of that, and you got me really excited. Anyone who's played minecraft with me, knows my favourite thing about minecraft is the elytra. Glide actually exhumed Minecraft for me.
/snail       /snail    /snail         /snail /snail      /snail   /snail                /snail        

cY Agent 115

  • Sr. Member
  • ****
  • Posts: 364
  • Death to trolls on the forums
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: cY Agent 115
  • Steam: cY Agent 115
Re: Force Input Script Command
« Reply #3 on: February 21, 2018, 10:58:35 PM »
Or maybe an Player Enter Script where they join the map and this script will trigger. I'd love that.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: Force Input Script Command
« Reply #4 on: February 22, 2018, 12:18:51 AM »
Or maybe an Player Enter Script where they join the map and this script will trigger. I'd love that.
?

cY Agent 115

  • Sr. Member
  • ****
  • Posts: 364
  • Death to trolls on the forums
  • Awards 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: cY Agent 115
  • Steam: cY Agent 115
Re: Force Input Script Command
« Reply #5 on: February 22, 2018, 02:45:44 AM »
@Craig I worded that completely wrong, I'm sleepy okay

I mean't, combining this with the player joins feature you can add this and make a global (idk what the word is) setting?

like as what dryym said
1: Disable double jump.
2: Add momentum to jumping so that you can't move around in midair like a weirdo.