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

command that returns hero position
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon Sep 17, 2007 8:58 am    Post subject: Re: The new version of the scripts Reply with quote

bis_senchi wrote:
The script works well only when one of the tag is activated and then the npc starts to follow.


Exactly. That is because you are using "xor".

A, xor, B means "A or B but not both"

You want "or" instead.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Tue Sep 18, 2007 8:42 am    Post subject: Another question Reply with quote

It works! Finally Razz Ok! Here is another question: I would like npcs to keep the modifications that have been modified with alter npc each time the map is load and WITHOUT beeing seen.

Any idea on how to do it?
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Tue Sep 18, 2007 8:52 am    Post subject: Re: Another question Reply with quote

bis_senchi wrote:
It works! Finally =D Ok! Here is another question: I would like npcs to keep the modifications that have been modified with alter npc each time the map is load and WITHOUT beeing seen.

Any idea on how to do it?


After a map loads, one tick passes before the map fades in, so you will have time to alter them in the map autorun script before they are seen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Wed Sep 19, 2007 8:41 am    Post subject: take care of one tick Reply with quote

James Paige wrote:

After a map loads, one tick passes before the map fades in


Ok! How do I take care of this tick? Is there something special that I should put in the autorun script?

Thanks in advance for helping!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Thu Sep 20, 2007 7:22 am    Post subject: Reply with quote

Just put all of the alterations that you want within the autorun script itself, but without any wait commands (otherwise the autorun script will wait for the map to fade in, and then the player will see things being changed). Most likely this means you will have to have tags for all of the different alterations that can happen, or maybe global variables keeping track of what NPCs have been made into what. Then your script would look like:

[pseudocode]
Code:

if(checktag(tag:NPC 3 changed)),then
 begin
  alternpc(3, stuff)
 end
if(checktag(tag:NPC 12 changed)),then
 begin
  alternpc(12, stuff)
 end

[/pseudocode]
where the stuff in alter NPC might involve global variables that you set when you alter the npc for the first time (for instance, if you alter NPC 12's picture, you can also save the picture number in a global variable called mapxNPC12Pic, perhaps, and then use this global variable in the map autorun script).

Or then again, what does custom do when it is asked to save the map state? If it saves alter NPC style changes, maybe you could just use that...
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Fri Sep 21, 2007 12:00 am    Post subject: Another error message Reply with quote

Msw188 wrote:
Or then again, what does custom do when it is asked to save the map state? If it saves alter NPC style changes, maybe you could just use that...


Yes Big grin Big grin Saving the npc state was just what I needed!

Now that I have implemented new stuff in YuGiOh game I will leave it or a while and came back to my sailormoon rpg game.

My new "problem" is the following. When hspeak compiles my hss file I have the following message

hspeak wrote:

warning variable (myhero, myhero2, myhero3, myhero4)
local variable myhero2 is never used

warning variable (myhero, myhero2, myhero3, myhero4)
local variable myhero3 is never used

warning variable (myhero, myhero2, myhero3, myhero4)
local variable myhero4 is never used


The problem seems to come from the load game script above

Code:

#---------------------------------------------------------------------------
script, load game, begin

copy color(1, 240) # color number 240 (dark blue)
#permet d'avoir les noms des menus lors des combats soulignés en bleu

suspend player
suspend Npcs

# Dans cette première parties, les walking pictures des filles peuvent être normales ou transformées!
 show map
 unlock hero (me)
 resume box advance
 variable (myhero, myhero2, myhero3, myhero4)
 
  if (check tag(tag: UsagiW)==ON) then, begin
  myhero:= find hero (hero: usagi chan)
  set hero picture (myhero, 49)
  set hero palette (myhero, 55) 
  end

  if (check tag(tag: AmiW)==ON) then, begin
  myhero2:= find hero (hero: ami chan)
  set hero picture (myhero, 50)
  set hero palette (myhero, 26) 
  end

  if (check tag(tag: MakotoW)==ON)then, begin
  myhero3:= find hero (hero: makoto chan)
  set hero picture (myhero, 81)
  set hero palette (myhero, 8) 
  end
 
  if (check tag(tag: MinakoW)==ON) then, begin
  myhero4:= find hero (hero: minako chan)
  set hero picture (myhero, 76)
  set hero palette (myhero, 92)   
  end

# Dans la deuxième partie du script, les filles récupèrent leur battle pictures qui ont
#disparues pour faire un menu plus classe!
 
  if(check tag (tag: Usagi)==ON)  then, begin
  myhero:= find hero (hero: usagi chan)
  set hero picture (myhero, 10,inside battle)
  set hero palette (myhero, 11,inside battle)
  end

  if (check tag (tag: Ami)==ON) then, begin
  myhero2:= find hero (hero: ami chan)
  set hero picture (myhero,5,inside battle)
  set hero palette (myhero,26,inside battle)
  end

  if (check tag (tag: Makoto)==ON) then, begin 
  myhero3:= find hero (hero: makoto chan)
  set hero picture (myhero,9,inside battle)
  set hero palette (myhero,8,inside battle) 
  end
 
  if (check tag (tag: Minako)==ON) then, begin
  myhero4:= find hero (hero: minako chan)
  set hero picture (myhero,4,inside battle)
  set hero palette (myhero,22,inside battle)
  end

resume player
resume npcs
load game2

end #end for the plotscript


The problem is not very very serious but I would like to get rid of this message. If somoene has any idea about the cause of the problem...
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Sep 21, 2007 6:58 am    Post subject: Reply with quote

if (check tag (tag: Makoto)==ON) then, begin
myhero3:= find hero (hero: makoto chan)
set hero picture (myhero,9,inside battle)
set hero palette (myhero,8,inside battle)
end
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sat Sep 22, 2007 8:37 pm    Post subject: Whoops! Reply with quote

Oookay... I seems that I forgot some modifications when I last worked on ths script.

Thanks you very much for noticing the mistake. I'm definitely not good at this kind of things

Sorry about positing an useless message and good luck!
_________________
It's time to make games!
Back to top
View user's profile Send private message Visit poster's website 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
Page 3 of 3

 
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