Jump to content

Photo

Change controls in a room


  • Please log in to reply
14 replies to this topic

#1 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 29 October 2010 - 05:14 PM

God, I realised I need something like.. a main script for my quest!
Please don't say it isn't possible to change his moveset! :-O
Link's moveset should be like this in the screen:

Up: Nothing (don't move)
Down: Nothing (don't move)
Left: Normal (walk left)
Right: Normal (walk right)
A: Walk up
B: Walk down
L, R, Map, Start: Normal (subscreen would be disabled)

I am using build 1296 at the moment. It would also be nice if he's moving 5x faster, though it isn't a must.
But first say if it's possible!

Edited by Avataro, 30 October 2010 - 11:13 AM.


#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 01 November 2010 - 10:48 AM

This would be simple as having an FFC script (or global if it is on every screen) that goes like this:

[pseudo-code]
if up is pressed -> up->pressed is false
[same for down]
if A is pressed -> A->pressed is false, up-pressed is true
[same for B]

#3 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 07:57 AM

Thanks icon_smile.gif
I tried making it. Though, I can't script icon_heh.gif

CODE
ffc script chooseyourdestination {
  void run() {
    while(true) {
    
dir_up->false;
dir_down->false;
input A->false, up->true;
input B->false, down->true;
    
      Waitframe();
    }
  }
}

Can someone help me?

Edited by Avataro, 04 November 2010 - 07:58 AM.


#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 November 2010 - 09:04 AM

CODE
ffc script chooseyourdestination {
  void run() {
    while(true) {
    
dir_up->false;
dir_down->false;
input A->false, up->true;
input B->false, down->true;
    
      Waitframe();
    }
  }
}

You're making up and down always true, with bad punctuation.

What you want is more like this (not sure it will work):
CODE
ffc script chooseyourdestination {
  void run() {
    while(true) {
    
Link->inputUp=false;
Link->inputDown=false;
if Link->inputA==true{
Link->input A=false;
Link->inputUp->true;
}
if Link->inputB==true{
Link->input B=false;
Link->inputDown->true;
}
    
      Waitframe();
    }
  }
}

Edited by MoscowModder, 04 November 2010 - 09:04 AM.


#5 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 09:15 AM

Hm, when i try to compile it says "Syntax Error, unexpected identifier, expecting lparen blahblah", in this line:
CODE
if Link->inputA==true{


#6 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 November 2010 - 09:19 AM

Let's try again:
CODE
ffc script chooseyourdestination {
  void run() {
    while(true) {
    
Link->InputUp=false;
Link->InputDown=false;
if (Link->InputA){
Link->InputA=false;
Link->InputUp->true;
}
if (Link->InputB){
Link->InputB=false;
Link->InputDown->true;
}
    
      Waitframe();
    }
  }
}

Edited by MoscowModder, 04 November 2010 - 09:45 AM.


#7 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 09:25 AM

and now in this line
CODE
Link->Input A=false;

it says: "expecting semicolon"

#8 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 November 2010 - 09:45 AM

Argh, a misplaced space. Try the updated script in my last post ^^

#9 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 09:55 AM

I hope i don't get annoying
Now in the line below it says: "unexpected true, expecting identifier"

EDIT:
I got it working by changing every "->true" into "=true" icon_biggrin.gif
I also tested it ingame.

Thanks MoscowModder!

Edited by Avataro, 04 November 2010 - 10:23 AM.


#10 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 November 2010 - 10:33 AM

You're welcome! Glad I could help!
You're right, I forgot to change "->" into "=".
Out of curiosity, what did you need this for? What are you going to use it to do?

#11 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 10:43 AM

Hard to explain,
I make screens where link has to choose the place where he wants to be teleported and this script makes the cursor.

#12 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 November 2010 - 10:56 AM

Interesting. I'd like to see a screenshot of that sometime.

#13 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 05:45 PM

I decided to make a test-quest that uses this script because I wanted.... to test it icon_biggrin.gif. (Made in build 1296)
Took me about one hour to make. Click

#14 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 November 2010 - 05:53 PM

Awesome! How did you do the other stuff, like the menu animation, labels, and 5 warps?

#15 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 04 November 2010 - 05:59 PM

I know, it's awesome! Does that belong in this topic? Anyway,
I used ffc's, multiple rooms and teleporters and the script.

Oh and seems, that I didn't need B for downwalking icon_doh.gif

Edited by Avataro, 04 November 2010 - 06:01 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users