 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Sat Oct 06, 2012 11:25 am Post subject: A no-random-battle RPG? |
|
|
Yes, this is sort of Zelda-esque, but I was wondering if I could plotscript on-map fighting.
That is, each player in the game you can play as (switch them from your menu) uses a seperate item/weapon on-screen to solve puzzles or bash monsters.
Any ideas of how to begin? I assume I will have to make an on-keypress event that switches my player to a different sprite, but how would I make the sprite hurt enemies?
Help will be much appreciated  _________________ #AlphaWolf#
http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.
##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios## |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Oct 06, 2012 11:53 am Post subject: |
|
|
That is certainly possible, but it is fairly advanced scripting.
You would have to keep track of stats for the NPCs that represent the enemies. NPC Extra data would work well for that purpose.
Your attack script could put a weapon NPC on the screen, and then set a timer, for a second script which would run a tick or two later to remove the weapon NPC and check to see if it collides with any of the enemy NPCs.
If you are still feeling unsure about scripting, this might be to advanced, but if you are ready for a challenge, go for it! |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Oct 06, 2012 10:03 pm Post subject: |
|
|
Actually, I don't see any need to use timers for this, because you don't need multiple scripts running at once. You should to use a global variable to say whether you're currently attacking, and if you are, then you can't start a new attack. (You don't need that variable in all cases, but I strongly suggest using it or your script could break due to innocent looking changes.) So the rough outline would be:
Code: | global variable (1, swinging weapon)
plotscript, my on keypress script, begin
if (swinging weapon) then (exit script)
# Don't allow attacking whlie moving, because it means you'd need to move the
# weapon sprite during the attack. But you can allow it if you're willing to do that.
if (key is pressed(key:ctrl) && hero is walking(me) == false) then (
#attack!
swinging weapon := true
suspend player
# use set hero sprite, and create a slice or NPC in front of the player
wait(1)
# animate the hero (using setherosprite) and weapon to the next frame...
wait(1)
# repeat
# check the tile in front of the hero for an NPC. If there is one and it can be hurt, hurt it. Delete it if its HP <= 0
# delete the weapon sprite/NPC
swinging weapon := false
resume player
)
end |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Wed Oct 10, 2012 1:52 pm Post subject: |
|
|
Thanks for all the help, except this may end up helping someone else more than me.
Its just that I'm burnt out on my game (3 months straight with only me and my sister and a burning computer screen), and I just wanted to add something new to it but learned my lesson too late.
So, a more psychological issue: How do I get back 'in' to my game? Just any helpful ideas would be nice.  _________________ #AlphaWolf#
http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.
##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios## |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Oct 10, 2012 5:50 pm Post subject: |
|
|
I'm not exactly the best person to give advice, but how about switching to some other task or part of the game? You could start sketching (or thinking about) graphics or maps for a later part of the game, for example. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Thu Oct 11, 2012 1:03 pm Post subject: |
|
|
well, any advice helps, really
I'm slowly getting back into my game, and besides a
certian girl ( ) and school, that's all I have to do
Well, and this Python class on coursera.com but well.. haha _________________ #AlphaWolf#
http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.
##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios## |
|
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
|