Post new topic    
Page 1, 2, 3  »
Slime Knight
Send private message
Froginator's scripting questions 
 PostMon Nov 03, 2014 7:32 pm
Send private message Reply with quote
You may have noticed, that I always post scripting questions, when I'm allowed to, so I started this thread to not annoy you guys ;D



My first question is, how can I make my characters walk diagonal?
(I know that it works from games like Tim-Tims Tower and somekindaninja both by Spoonweaver)
Liquid Metal King Slime
Send private message
 
 PostMon Nov 03, 2014 8:17 pm
Send private message Reply with quote
somekindaninja's script is open for the viewing and the taking. knock yourself out.
Slime Knight
Send private message
 
 PostTue Nov 04, 2014 12:54 pm
Send private message Reply with quote
Ok thanks!
Slime Knight
Send private message
 
 PostFri Nov 07, 2014 1:21 pm
Send private message Reply with quote
Is there a script that makes jumping over specific objects possible?
(with animation and something that makes the character actually "jump over" it)
Liquid Metal Slime
Send private message
 
 PostFri Nov 07, 2014 2:17 pm
Send private message Reply with quote
Froginator wrote:
Is there a script that makes jumping over specific objects possible?
(with animation and something that makes the character actually "jump over" it)


I have two ideas to help script the jumping but I'm not sure how they'd work in such a game since you have no grid.

My ways are to:
1) Use zones which are placed around gaps. When the zone is stepped on it triggers a script to make the hero jump left, right, up or down depending on the orientation of the gap being jumped.

2) Make the objects NPCs. When you talk to the NPC it triggers a script which makes you jump over it based on your orientation.

In a game with no grid it may be possible doing something like:
3) Have a jump/interaction button designated on the keyboard. Every time you click that button a code will be triggered which will check if your are in the range of a NPC to be jumped over. If you are then jump occurs. (Not sure how to implement this but thats where I'd start my attempts if I were to be coding such a thing).

Perhaps others have better ideas. I'm kind of interested to see what others say now.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Slime Knight
Send private message
 
 PostFri Nov 07, 2014 4:16 pm
Send private message Reply with quote
These are ideas I also had. Especially the idea with the NPCs, but the one with the button is more for what I'm going for. I also want the player to have an item wich allows him to do so. And here's another question: Is it possible to have more than one script as the "On keypress script" on a map?
Liquid Metal King Slime
Send private message
 
 PostFri Nov 07, 2014 4:31 pm
Send private message Reply with quote
Froginator wrote:
And here's another question: Is it possible to have more than one script as the "On keypress script" on a map?


No, but it is perfectly easy to have one on script do many things

Code:

plotscript, main on keypress handler, begin

  if(key is pressed(key:z) && not(hero is walking(0))) then(
    # do something whenever z is pressed but the leader is not walking
  )

  if(key is pressed(key:x) && read zone(2, hero x(0), hero y(0))) then(
    # do something whenever x is pressed, but only if the leader is standing on zone 2
  )
 
  if(key is pressed(key:a) && check tag(tag:have magic sword)) then(
    # do something whenever a is pressed, but only if a certain tag is ON
  )

end
Slime Knight
Send private message
 
 PostSat Nov 08, 2014 11:28 am
Send private message Reply with quote
Thanks for all the help, but Spoonweavers script from somekindaninja doesn't work... And yes I also copied the global variable, into my script file but my OHR always says that something is wrong with the script... Isn't there another way to make characters walk diagonal? Or a fix for the script?
Metal King Slime
Send private message
 
 PostSat Nov 08, 2014 6:54 pm
Send private message Reply with quote
Froginator wrote:
Thanks for all the help, but Spoonweavers script from somekindaninja doesn't work... And yes I also copied the global variable, into my script file but my OHR always says that something is wrong with the script... Isn't there another way to make characters walk diagonal? Or a fix for the script?


What does it say is wrong with the script? It is hard to diagnose a problem when you have no idea what that problem is.
Liquid Metal King Slime
Send private message
 
 PostSat Nov 08, 2014 8:04 pm
Send private message Reply with quote
the somekindaninja script will require personal scripting in order to add to it. I'll try to answer any general questions for you, but if you're looking for a ton of scripting work I'll have to charge you.
V


P.S. Also, to try to answer your problem. It's possible you copied it in wrong. Maybe a heading was placed wrong or maybe you forgot a " ) " or end.
You might also be lacking the required animation walkabouts. I believe the script uses up to walkabout 15-ish? You might also be lacking the right number of sound effects or npcs.
Further more, things like npcs and doors will likely stop working the correct way while using the script. This is because you've left the comforts of the tilemap and is largely unavoidable. Short of scripting a solution to that, it likely won't be possible.

somekindaninja's script is meant as a scripting assistance and not to be plugged directly into a game. You have my permission to do so, but I doubt it's going to work the way you want it to.
Slime Knight
Send private message
 
 PostSun Nov 09, 2014 8:56 am
Send private message Reply with quote
Ok. I think I understand why this will not work. I think I also gonna scratch diagonal walking from my list because as I thought about it yesterday, I realized that some things like the dashing feature will not work correctly with the diagonal walking script implemented.

And lately, when I was looking around for plotscripting commands, I dind't really saw any that could help me with my jumping problem...
I want to make an item wich allows you to jump like in The Legend of Zelda- Link's Awakening, and holes or fences over wich you can jump. I'm sure there are commands to do so but I can't find them :I
Can somebody send them or show me how I can program this jumping stuff?
Liquid Metal King Slime
Send private message
 
 PostSun Nov 09, 2014 4:48 pm
Send private message Reply with quote
Well, sprinting would be pretty easy to implement into the somekindaninja script. But then, to do that you'd need somekindascriptingskills.

You'd want to adjust the Z position of the character in a scripted event. Someone explained how to make one of these to you earlier. Asking for the whole script is pointless sense it would need to be customized for your exact game, as all scripts will likely need at least a little of. Again, as I've said, if you want these types of things in your game you'll need to learn scripting, there's no way around it.
Metal King Slime
Send private message
 
 PostMon Nov 10, 2014 9:43 am
Send private message Reply with quote
By the way, there's also a diagonal movement script on the wiki:
http://rpg.hamsterrepublic.com/ohrrpgce/Scripts:Diagonal_walking

I found an amazing 5 articles on the wiki about making heroes and NPCs jump.
For jumping, see the following article:
How do I make an NPC or hero look like it's jumping?
See also
What is the set hero Z command, and how do I correctly use it?
Slime Knight
Send private message
 
 PostFri Nov 14, 2014 4:48 pm
Send private message Reply with quote
Hello again guys! I have a rather simple question to ask (I think).
I want to make an NPC which is more than one tile tall. it should be like 3x2
tiles big. How can I do that? Do I need to script or is there just an easy trick to do it?
Metal Slime
Send private message
 
 PostFri Nov 14, 2014 5:41 pm
Send private message Reply with quote
Use slices and replace an NPC slice with a 80x80 enemy sprite slice. I think that would be the gist of it. I'm going to be using at least a few 50x50 enemy sprites for special NPCs in my game. Non-animated, of course.
Display posts from previous:
Page 1, 2, 3  »