Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

rougelike RPG
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Thu Sep 18, 2003 12:06 pm    Post subject: Reply with quote

Oh, Duhh.... I figured out what was wrong.

Your script uses an argument to know which npc to destroy (the 'who'), but the npc isn't passing to this script, because the texbox calls it *! So who is always 0 (or whatever the default is).

Instead, use this script:

Code:
script,enemyHpandatt1,who,begin

show textbox (100)  #change this
wait for textbox

setvariable(enemyHP1,enemyHP1--1)
setvariable(herohp,herohp--1)
if(readglobal(5),<=,0)then(
destroyNPC(who)
wait(40)
writeglobal(1,readglobal(5)+5)
)
end


Then just link straight to the script from the npc, without showing any textboxs..

*Wait. Did you actually say that the textbox calls the script? :S
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Thu Sep 18, 2003 10:02 pm    Post subject: Reply with quote

*American surfer voice* ahhhh DUDE! like totally raidcal!
*british voice*Pip Pip! thanks cacti ! the script is called from a text box but i've changed it somewhat here is the new script

code:
script,enemyHpandatt1,who,begin


resume npcs,writeglobal(enemyHP1--heroattack),setvariable(herohp,herohp--1),suspendNpcs
if(readglobal(5)<=0)then(destroyNPC(who),wait(4),writeglobal(5,5))
end

this means I can adapt the damage done by the hero using class and level!
ps.can you fix this script because Im dumb Crying
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Sep 20, 2003 12:41 pm    Post subject: Reply with quote

Uhhh.... still not working?

ah ha...
writeglobal(enemyHP1--heroattack)
ain't right. Does this actually compile? That probably set global number enemyHP1 - heroattack to 0. You want

set variable(enemyHP1, enemyHP1--heroattack)

Here's you script rewritten: (don't clump it up like that)
Code:

script,enemyHpandatt1,who,begin

 set variable(enemyHP1, enemyHP1--heroattack)
 setvariable(herohp,herohp--1)
 if(readglobal(5)<=0)then(destroyNPC(who),wait(4),set variable(enemyHP1, 5))

end

You can take out the suspend and resume npcs commands, they do nothing.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Mon Sep 22, 2003 9:48 pm    Post subject: Reply with quote

yay! Well now I've got the basics (yes that is basic) I can start doing advanced stuff like make spells and custom menus
any ideas on how to make a fire ball spell with a splash area?
I would want the spell to move in the defined direction and explode
here is whow I might be able to do it:
Code:

  Script,fireball,begin
  #this is where the code to make the fire ball go in the direction you want:
  #e.g if (keyispressed(left))then(blah,blah,blah) I have no idea about this
   


This is soo ruff but I have no idea
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Sep 23, 2003 8:32 am    Post subject: Reply with quote

Instead of checking all the arrow keys, just use the heros direction, and check for one shoot key. That's the easy bit. The hard bit is knowing when the fire bolt has crashed into an enemy...
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Tue Sep 23, 2003 9:26 pm    Post subject: Reply with quote

how would I check the hero's directon
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Tue Sep 23, 2003 9:53 pm    Post subject: Reply with quote

Code:
if (herodirection == "whatever")
  then (
        #type stuff
         )

_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Sep 24, 2003 5:05 am    Post subject: Reply with quote

More specifically (Before you go of and write seperate code for everydirection):

The global is so that you can only shoot one bolt at a time
Code:

global variable (1, boltflying)

script, shootbolt, begin
variable (herodir, boltx, bolty, boltnpcref)
if (boltflying == false) then, begin
boltflying := true
herodir := hero direction(me)
#this block find the x and y co-ords of the tile in front of the hero.
if (herodir == up) then (boltx := hero x(me), bolty := hero y(me) -- 1)
if (herodir == right) then (boltx := hero x(me) + 1, bolty := hero y(me))
if (herodir == down) then (boltx := hero x(me), bolty := hero y(me) + 1)
if (herodir == left) then (boltx := hero x(me) -- 1, bolty := hero y(me))
boltnpcref := create npc (ID, boltx, bolty, herodir)  #replace ID with the ID no. of the npc
walk npc (boltnpcref, herodir, 10) # change 10 to the distance the bolt will travel
#and then you need to do some checking to see whether the bolt has crashed into anything..
while (npc is walking(boltnpcref)) do, begin
boltx := npc x (boltnpcref)
bolty := npc y (boltnpcref)
if (npc at spot (boltx, bolty) <> boltnpcref) then, begin #this works on a presumtion that any other npc on the spot will have a lower npc reference, and therefore be returned
destroy npc (boltnpcref) #hopefully 'npciswalking' will return false if the npc doesn't exist
destroy npc (npc at spot (boltx, bolty)) #change this to take away enemy hp if you don't want it to kill him..
wait (1)
end
destroy npc (boltnpcref) #incase it stopped walking instead of hitting something
boltflying := false
end
end



Work on that... I hope it does work..
If you want a splash area, you'll have to add some code after the while loop..
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Wed Sep 24, 2003 9:13 pm    Post subject: Reply with quote

What?!?! Wow Thats umm well the less said *^_^* buuuut I think I get it , oh and by the way enemyHPandatt is broken again Rolling Eyes






Ps:congrats to lord Firestorm on hoshima!
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Wed Sep 24, 2003 10:23 pm    Post subject: Reply with quote

Umm...

*points to Mad Cacti*

What he said. Big grin

And..uh...I just started remaking Hoshima. How do you know it's not gonna suck? Raspberry!

I'm just kiddin' with ya. If I'm working on the story aspects, and Cube's workin' on the minigame aspects, then it'll be a crash-bang-boom of a game.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Sat Sep 27, 2003 1:05 pm    Post subject: Reply with quote

Is there any way an enemy can use it and hit you ?
exprence wont give me levels ,the global increases and every thing but why wont it give me levels!?
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Sat Sep 27, 2003 7:01 pm    Post subject: Reply with quote

James hasn't created a command for that. I'd like to add "yet" to that, but he may not. Why not suggest it to him?

suggestionbox@HamsterRepublic.com
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Sun Sep 28, 2003 1:48 am    Post subject: Reply with quote

come again ?
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
Setu_Firestorm
Music Composer




Joined: 26 Mar 2003
Posts: 2566
Location: Holiday. FL

PostPosted: Mon Sep 29, 2003 10:48 pm    Post subject: Reply with quote

jabbercat wrote:
Is there any way an enemy can use it and hit you ?
exprence wont give me levels ,the global increases and every thing but why wont it give me levels!?


I was saying that as there are plotscripting commands that let you mess with various hero stats, there isn't a command to mess with your levels.
_________________


Facebook: http://www.facebook.com/georgerpowell
Newgrounds: http://setu-firestorm.newgrounds.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
jabbercat
Composer




Joined: 04 Sep 2003
Posts: 823
Location: Oxford

PostPosted: Mon Oct 13, 2003 10:43 am    Post subject: Reply with quote

all my levels work by global so that wont help Crying
why me??? why must I have the crazy missions that will never work?
_________________
Moogle no longer owes prizes.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
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