|
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Voltire Yep.
Joined: 16 Oct 2010 Posts: 87 Location: A nice man's big, white van.
|
Posted: Mon Jan 31, 2011 7:10 pm Post subject: Jumping? Like, onto ledges? |
|
|
Is there a script I can use to make a character not only jump (because I have the script from the wiki to do that) but jump up onto a ledge?
Like, if a player presses, say, the x key they can jump onto ledges and edges that they could not reach by just pressing forward and walking up on it.
Futher, is there a way to make it to where they can only jump with a certain item equipped (tags, most likely.)
And while I'm on the subject, what about a script to make it able to shimmy across ledges?
Thanks if you can help, I know this might be a lot. |
|
Back to top |
|
|
Pepsi Ranger Reality TV Host
Joined: 05 Feb 2003 Posts: 493 Location: South Florida
|
Posted: Mon Jan 31, 2011 8:04 pm Post subject: |
|
|
As far as button commands go, you'll want to use a keypress script. TMC usually has better (and more thorough) examples, but to get you started, you're gonna want to use:
Code: | variable (loop)
set variable (loop,true)
#enter the continuous cycle
while (loop) do(
if (keyval (key:X) >=1) then(
#insert animations and whatnot here
)
if (condition to break loop) then(
set variable (loop,false)
)
#make sure the loop continues by using a wait
wait (1)
)
end |
As far as you're specific actions go, you'll have to draw the graphics and script the actions yourself. I have a single use animation script in HamsterSpeak #25 that may help you if the idea of writing out lengthy scripts intimidates you. It's a single command with a bunch of variables, so it's a bit complicated to use. But it works great if you understand that it only animates one character at a time.
http://superwalrusland.com/ohr/issue25/as/as.htm
You'll want to read the article on how to use it, and then you'll want to include "animation scripts.txt" to your plotscript file.
You'll also need to include scancode.hsi for your keyval to work.
You can also check out Tightfloss Maiden, which uses extensive animation and accessory equipment slots (last slot on the equipment menu) to move the character from map to map, for reference. Several of the things you described wanting to do are staples of this game. There's a link to it both here and on Slime Salad's game list. _________________ Progress Report:
The Adventures of Powerstick Man: Extended Edition
Currently Updating: General sweep of the game world and dialogue boxes. Adding extended maps.
Tightfloss Maiden
Currently Updating: Chapter 2 |
|
Back to top |
|
|
Voltire Yep.
Joined: 16 Oct 2010 Posts: 87 Location: A nice man's big, white van.
|
Posted: Tue Feb 01, 2011 7:14 pm Post subject: |
|
|
Pepsi Ranger wrote: | You can also check out Tightfloss Maiden, which uses extensive animation and accessory equipment slots (last slot on the equipment menu) to move the character from map to map, for reference. Several of the things you described wanting to do are staples of this game. There's a link to it both here and on Slime Salad's game list. |
Yeah, I was going to download it a while ago, but I have dial up. And it's kinda big. Yeah.
Anyway, thanks for the script, I will try to get it up and running!
EDIT: Oh, and about the link: Mercy, the page be missin'! |
|
Back to top |
|
|
Pepsi Ranger Reality TV Host
Joined: 05 Feb 2003 Posts: 493 Location: South Florida
|
Posted: Tue Feb 01, 2011 8:37 pm Post subject: |
|
|
It's not that big. Most dial-up services can retrieve a file of that size in under an hour.
In any case, the scripts are in HamsterSpeak #25. You can get there from www.superwalrusland.com and click on the HamsterSpeak link. The article is labeled in the features section. _________________ Progress Report:
The Adventures of Powerstick Man: Extended Edition
Currently Updating: General sweep of the game world and dialogue boxes. Adding extended maps.
Tightfloss Maiden
Currently Updating: Chapter 2 |
|
Back to top |
|
|
Inferior Minion Metric Ruler
Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Wed Feb 02, 2011 1:53 pm Post subject: |
|
|
Pepsi Ranger wrote: | It's not that big. Most dial-up services can retrieve a file of that size in under an hour.
In any case, the scripts are in HamsterSpeak #25. You can get there from www.superwalrusland.com and click on the HamsterSpeak link. The article is labeled in the features section. |
Pepsi was just missing the l in .html when he pasted the link. The following should work: http://superwalrusland.com/ohr/issue25/as/as.html
Cheers,
~IM _________________
|
|
Back to top |
|
|
Voltire Yep.
Joined: 16 Oct 2010 Posts: 87 Location: A nice man's big, white van.
|
Posted: Wed Feb 02, 2011 9:13 pm Post subject: |
|
|
Ok, so I got all the animation script together (no error when I try to compile it) but there is an error on:
Code: | if (condition to break loop) then(
set variable (loop,false)
) |
and I'm not sure why. Condition to loop is an unrecognised name.
Also, is there a way to make it to where when you jump and move forward, you hop on a ledge that you couldn't move on by just walking on? Actually, I might be able to figure it out myself... |
|
Back to top |
|
|
Pepsi Ranger Reality TV Host
Joined: 05 Feb 2003 Posts: 493 Location: South Florida
|
Posted: Thu Feb 03, 2011 9:06 am Post subject: |
|
|
Sorry, "condition to break loop" isn't an actual term. I just wrote that in there to let you know that you needed some kind of condition to set "loop" to false if you ever wanted to break out of the infinite loop.
For example, if the player changes maps and the keypress function is no longer needed, you might want to set the condition to run only when "current map" registers that the player is in fact on the relevant map, and then break it when the current map no longer matches the defined condition.
For example:
Player should be able to jump, climb, and pick his nose on Map 8, but not on 7 or 9.
Code: | if (current map<>8) then(
set variable (loop,false)
) |
or, if you'll want him to perform tricks on maps 8, 10, and 12, but nowhere else, you might say
Code: | variable (m)
set variable (m,current map)
if ((m<>8),and,(m<>10),and,(m<>12)) then(
set variable (loop,false)
) |
Note: New syntax has it written
I just never use new syntax, so do whichever you're more comfortable with.
Any condition can break a loop: random numbers that are drawn in a lottery, hero stands in the forbidden direction, etc. You just have to be clear on what breaks it.
If you haven't checked it out already, you'll probably want to look up some of these terms on the plotscript dictionary to see how they're intended for use: http://hamsterrepublic.com/ohrrpgce/docs/plotdict.xml. You'll find that plotscripting has commands for many of the things you want to do. _________________ Progress Report:
The Adventures of Powerstick Man: Extended Edition
Currently Updating: General sweep of the game world and dialogue boxes. Adding extended maps.
Tightfloss Maiden
Currently Updating: Chapter 2 |
|
Back to top |
|
|
Voltire Yep.
Joined: 16 Oct 2010 Posts: 87 Location: A nice man's big, white van.
|
Posted: Thu Feb 03, 2011 8:57 pm Post subject: |
|
|
Ah, okay, that makes sense. Thanks.
Also, I checked out the plotdictionary that came when I downloaded the game creator. I read though most of it, but it is a lot to take in without practicing it and attempting to write complex code. But it did teach me many things. I'll probably go look over it again right now. |
|
Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|