Author Topic: hascontrol()??? (Internal scripting)  (Read 1920 times)

Starspire

  • Developer of Spiral Flame
  • Captain
  • *****
  • Posts: 681
  • #1 CHAOS;CHILD shill
    • View Profile
hascontrol()??? (Internal scripting)
« on: September 04, 2015, 11:33:27 pm »
If I was making an endless runner (well, not endless) VVVVVV level, would it be possible to flip while hascontrol() is active?

Starspire

  • Developer of Spiral Flame
  • Captain
  • *****
  • Posts: 681
  • #1 CHAOS;CHILD shill
    • View Profile
Re: hascontrol()??? (Internal scripting)
« Reply #1 on: September 17, 2015, 01:37:11 am »
Can't anybody help?

lol...ipops2

  • Guest
Re: hascontrol()??? (Internal scripting)
« Reply #2 on: October 17, 2015, 07:40:49 pm »
I'm a little bit early into internal scripting but i can help you :viridian:



YOU IMPRESSED!?

That Souleye Crewmate

  • Captain
  • *****
  • Posts: 248
  • Finally changed this old avatar.
    • View Profile
Re: hascontrol()??? (Internal scripting)
« Reply #3 on: October 18, 2015, 09:08:30 am »
I'm a little bit early into internal scripting but i can help you :viridian:

[glow=red,2,300][/glow]
[color=white]
YOU IMPRESSED!?
I'm pretty sure he looked it up by now. But whatever.

Starspire

  • Developer of Spiral Flame
  • Captain
  • *****
  • Posts: 681
  • #1 CHAOS;CHILD shill
    • View Profile
Re: hascontrol()??? (Internal scripting)
« Reply #4 on: October 25, 2015, 03:45:27 pm »
No I haven't.

shape worrior t

  • Professor
  • ****
  • Posts: 141
  • Fan of Nintendo, VVVVVV, and other things.
    • View Profile
Re: hascontrol()??? (Internal scripting)
« Reply #5 on: October 26, 2015, 02:29:30 am »
Doesn't seem like you can... at least, hascontrol doesn't seem to allow you to do anything in the middle of a script....
« Last Edit: October 26, 2015, 02:31:08 am by shape worrior t »

Info Teddy

  • Captain
  • *****
  • Posts: 272
    • View Profile
Re: hascontrol()??? (Internal scripting)
« Reply #6 on: May 11, 2018, 06:04:33 am »
hascontrol is meant for undoing nocontrol, which is meant to be effective even after a script stops.

if you want to give the player control while a script is still running, you'll need to use a background timer
basically you use n flags to represent a number that can go up to 2n, and then you make a script chain (recommended to do with do-pointers) that increments that binary number, and you use gotoroom to keep triggering that script each tick. if you don't want it to be annoyingly noticeable, you need to make sure the room is static. that means no enemies, moving plats, or warping backgrounds that are not solid colors. if you have any of those, they will noticeably and annoyingly jitter. you can have another, standalone gotoroom trigger to visibly freeze the room with those dynamic elements if wanted. everything will be frozen and act frozen except for horizontal gravity lines (which you can get stuck in). if you're not going to completely freeze the room like that, you can have gravity lines but make sure the player can't hit a gravity line and the increment timer trigger at the same time, and make sure players can't stand near a gravity line to stop the timer. this will still let players slow down the timer by repeatedly moving near these gravity lines. obviously, when it's done you will endtext the backgroundtext text box. moving between rooms will require a trigger on the boundary of the room that does gotoroom to the adjacent room and moveplayer to the other side of the room.