Welcome, Guest. Please login or register.

Author Topic: A Question  (Read 4142 times)

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
A Question
« on: 3 Apr 2016, 17:59 (7 years and 10 months ago) »
Alright, here's what I want.

- activate a terminal, which will start a custom song and destroy some warp tokens a few rooms away which guards a trinket
- if you don't make it to the room with warp tokens before the song ends, the warp tokens come back and you can't collect the trinket

Is this possible?

Ally 🌠

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1360
  • <3
    • View Profile
    • Ally 🌠
Re: A Question
« Reply #1 on: 3 Apr 2016, 18:11 (7 years and 10 months ago) »
Yes, if you have a lot of flags.

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
Re: A Question
« Reply #2 on: 3 Apr 2016, 18:35 (7 years and 10 months ago) »
Yes, if you have a lot of flags.
And how would you do that?

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
Re: A Question
« Reply #3 on: 8 Apr 2016, 18:03 (7 years and 10 months ago) »
still waiting for an answer

SJMistery

  • tOLP2 Tester
  • Professor
  • ****
  • Posts: 125
    • View Profile
Re: A Question
« Reply #4 on: 9 Apr 2016, 06:21 (7 years and 10 months ago) »
Okay, to change music and make tokens dissapear, it works like this:


Set up a Terminal name "X" X, X2,X3, etc being wathever you want to call it
press Esc

you will see "scripts"

select "X"

on "X" type:
music(n)
flag(m,on)

m and n must be numbers, n depends on which song you want to play, sometimes you will need to add "a" after the number. m can be any number from 0 to 99 but there is one number in particular that can be dangerous to some versions of the game, i recommend to use 1 and go up from there if you need more flags


on the room with the tokens

you must put a room-sized scriptbox called "X2"

enter to script "X2" the same way you entered "X" and type:

ifflag(m,X3)

then put a one tile-sized script box inside a wall to make sure nobody can enter on it called "X3"

on that script, type

destroy(warptokens)

i love to put a flash animation right before for it to look better, it would be:

flash
destroy(warptokens)



as for making the tokens dissapear at a specific timer, we would need a room-sized script that triggers on the same room you put the terminal and disables the flag, the command being "flag(m,off)", and make the script delay itself for a fixed number of ticks, with 30 ticks being rougly equal to one second. The problem is that the delay script also makes the controls to freeze until the countdown ends. Not sure if there is anything capable of delaying a script without blocking the controls.

As for using a custom music, you require n to be 15a if my memory serves right, and you must put the song in the program files, replacing predestined fate remixed. it MUST be that one song, or the game will glitch out.

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
Re: A Question
« Reply #5 on: 9 Apr 2016, 08:31 (7 years and 10 months ago) »
so if we can find a way to delay a script without disabling character movement, this'll work

SJMistery

  • tOLP2 Tester
  • Professor
  • ****
  • Posts: 125
    • View Profile
Re: A Question
« Reply #6 on: 10 Apr 2016, 06:48 (7 years and 10 months ago) »
yep

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
Re: A Question
« Reply #7 on: 10 Apr 2016, 08:14 (7 years and 10 months ago) »
I'm screwed

SJMistery

  • tOLP2 Tester
  • Professor
  • ****
  • Posts: 125
    • View Profile
Re: A Question
« Reply #8 on: 10 Apr 2016, 12:00 (7 years and 10 months ago) »
well, maybe someone with expertise on scripts knows one. internal scripst are a tough beast for me.

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1606
    • View Profile
Re: A Question
« Reply #9 on: 10 Apr 2016, 14:23 (7 years and 10 months ago) »
The only way I can think of is make background scripts keep incrementing a binary number with flags, and trigger a script once you're at a certain number. If you keep cycling through a set of equivalent rooms (as if you were making a room animation) you can also greatly reduce the number of flags you need.

I'll probably make some kind of demo level.

SJMistery

  • tOLP2 Tester
  • Professor
  • ****
  • Posts: 125
    • View Profile
Re: A Question
« Reply #10 on: 12 Apr 2016, 10:47 (7 years and 10 months ago) »
now that you mention it, i think there is a slight delay when the game opens a script from inside another script, like when you use ifflag(n,X). maybe with a loooooong sequence of those scripts we could delay the activation, but i doubt there will be enough space.

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1606
    • View Profile
Re: A Question
« Reply #11 on: 12 Apr 2016, 11:33 (7 years and 10 months ago) »
But as far as I know you can't move while a script is continuously running.

Star

  • tOLP Contributor
  • Super Captain
  • ******
  • Posts: 557
    • View Profile
Re: A Question
« Reply #12 on: 12 Apr 2016, 13:52 (7 years and 10 months ago) »
Hascontrol?

Ally 🌠

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1360
  • <3
    • View Profile
    • Ally 🌠
Re: A Question
« Reply #13 on: 12 Apr 2016, 16:19 (7 years and 10 months ago) »

FIQ

  • Global Moderator
  • Professor
  • *
  • Posts: 132
    • View Profile
    • GitHub profile
Re: A Question
« Reply #14 on: 15 Apr 2016, 00:10 (7 years and 10 months ago) »
Nocontrol/hascontrol is only suitable for disabling control while scripts aren't running. There is no way to let motion happen while a script executes, unless you use what is generally called "background scripts" here. Basically, have a script that fills the room that increments a timer and then ends with gotoroom(whatever room you are in). This will allow the script to execute continuously, but let Viridian be controlled as it happens.

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
Re: A Question
« Reply #15 on: 16 Apr 2016, 10:35 (7 years and 10 months ago) »
Nocontrol/hascontrol is only suitable for disabling control while scripts aren't running. There is no way to let motion happen while a script executes, unless you use what is generally called "background scripts" here. Basically, have a script that fills the room that increments a timer and then ends with gotoroom(whatever room you are in). This will allow the script to execute continuously, but let Viridian be controlled as it happens.

can i have an example?


Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1606
    • View Profile
Re: A Question
« Reply #16 on: 16 Apr 2016, 10:45 (7 years and 10 months ago) »
Nocontrol/hascontrol is only suitable for disabling control while scripts aren't running. There is no way to let motion happen while a script executes, unless you use what is generally called "background scripts" here. Basically, have a script that fills the room that increments a timer and then ends with gotoroom(whatever room you are in). This will allow the script to execute continuously, but let Viridian be controlled as it happens.

can i have an example?
See attachment for an example

LollipopTopic starter

  • tOLP Contributor
  • Captain
  • *****
  • Posts: 398
  • aaaaaaAAAAAAAAA
    • View Profile
Re: A Question
« Reply #17 on: 16 Apr 2016, 10:59 (7 years and 10 months ago) »
what are those #v's for

ugh i give up

its almost as hard to use and understand as linux

almost

Shiny K

  • tOLP Contributor
  • Hyper Captain
  • *******
  • Posts: 1085
    • View Profile
Re: A Question
« Reply #18 on: 16 Apr 2016, 11:00 (7 years and 10 months ago) »
what are those #v's for
FOR SOME REASON VED ADDS THEM AND WE DONT KNOW WHY

Dav999

  • Administrator
  • Hyper Captain
  • *
  • Posts: 1606
    • View Profile
Re: A Question
« Reply #19 on: 16 Apr 2016, 11:18 (7 years and 10 months ago) »
They're added so Ved can accurately recognize internal scripting say()s and text(1,0,0,4)s added by itself, and not miserably screw up working scripts or actual text boxes.

ugh i give up

its almost as hard to use and understand as linux

almost
All it does is cycle between 5 rooms and play a sound effect in one of those rooms.
« Last Edit: 16 Apr 2016, 11:20 by Dav999 »