SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Help

Reply
 
Thread Tools Search this Thread
Old 06-17-2010   #1
QuAsIqUoTeD
Default Quotes within quotes in scripts?

Hi there. I've been wanting to make a script that would allow me to make my character face in the opposite direction and change the controls accordingly. I don't really have any issue with using the down arrowkey instead of the up arrowkey and vice versa when the player character is facing backwards, but just for the hell of it, I wanted to make it so I didn't have to do that. In order to do this, I added the following into my autoexec.cfg file:

bind j "cam_rotate 180; setcontrol forward "DOWN ARROW"; setcontrol bacward "UP ARROW";"
bind k "cam_rotate 0; setcontrol forward "UP ARROW"; setcontrol backward "DOWN ARROW";"

At first I was like, whoo!
But then I was all, wait a minute here.

Computers are stupid; hence, mine doesn't know that when I introduce another double-quote in the course of the code, I mean to open another string, not close the one that I have open already. How do I get around this? Again, it's not like I really need to; I'm just really curious.

Last edited by QuAsIqUoTeD; 06-17-2010 at 11:12 PM.
QuAsIqUoTeD is offline   Reply With Quote
Old 06-17-2010   #2
Mystic
チェン!
Administrator
 
Mystic's Avatar
Default

You can only have one set of quotes per line, but you can set aliases to get around this. For instance:

alias line1 say "This is part of the macro"
alias line2 say "So is this."
bind k "line1; line2;"
Mystic is offline   Reply With Quote
Old 06-18-2010   #3
Cue
ALAM STOP BREAKING THE S
 
Cue's Avatar
Default

It should probably register escaping quotes "Like this to do \"DOWN ARROW\"" but it wouldn't surprise me if this doesn't exist. Might register that through as a bug actually.
__________________
Quote:
<+Jev3> btw guys, now that Cue is gone, the Master Server is going to be awesome http://tvtropes.org/pmwiki/pmwiki.ph...tistsAreBetter
Quote:
<@Mystic> That's a good idea, Cue.
Cue is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.