The Daily Click ::. Forums ::. Klik Coding Help ::. How do I do CPU conversation windows?(with Global values)
 

Post Reply  Post Oekaki 
 

Posted By Message

Chris324



Registered
  30/05/2007
Points
  5
30th May, 2007 at 17:43:33 -

I need them to be global so that they can change with events, even when its not on the same frame.

I have it right now so its

(Globals are set in another frame)

"Object not moving"
"Overlapping CPU"
"Upon hitting up"
"Event(global)=1
>Display paragraph 1

and then I have another one that is

"Object not moving"
"Overlapping CPU"
"Upon hitting up"
"Event(global)=2
>Display paragraph 2

But that doesn't work(I assume for obvious reasons)

My problem is I can't figure out what code to use to make conversations different based on the global number. SO yep thats my question, how do I make conversation different based on a global value?

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
30th May, 2007 at 20:41:54 -

I don't get the Event(global) thing. Do you mean "when global value = 1"? Because then it SHOULD work. Maybe your value is starting out as 0?

 
Old member (~2004-2007).

Chris324



Registered
  30/05/2007
Points
  5
30th May, 2007 at 21:21:39 -

Say if you got an item in another frame, that would set the Global to 2, but if you didn't get the item the global would be set to 1(at the start of frame if global was 0) Now when you go to another frame I wanted a NPC(non playable character) to recognize if you have it, or if you don't. And to have two different dialogues based on if you had it or not.

For example, how did they do that in Ocarina of Time, they had the character stop you, unless you had a sword, and a shield, but when you did have it he would let you go by. That what I'm going for.

The reason I think it doesn't work is because it says "

"Object not moving"
"Overlapping CPU"
"Upon hitting up"
"Event(global)=1 (So it has to equal that for it to be able to hit up)
>Display paragraph 1

"Object not moving"
"Overlapping CPU"
"Upon hitting up"
"Event(global)=2 (and it has to equal that for it to hit up, but it can't equal them both, so I think I am on the right track, but my code is wrong in some area)
>Display paragraph 2


 
n/a

savvy001



Registered
  27/03/2007
Points
  295
31st May, 2007 at 12:41:56 -

they had the character stop you, unless you had a sword, and a shield, but when you did have it he would let you go by. That what I'm going for.

to me this sounds like
lets say this is frame 1

events
1
if character pics up a sword, set global value 1 to 1

2
if character pics up a shield, set global value 2 to 1

and this is frame 2
3
line 1 if character is coliding with Guard-character
line 2 global value 1=1
line 3 global value 2=1
then set Guard-character flag 1 on
and set Guard-character animation to passing tru (or something)

4
line 1 if character is coliding with Guard-character
line 2 Guard-character flag 1=of
then let character bounce (or stop...)

hope this helps?

Image Edited by the Author.

 
Living in space

Chris324



Registered
  30/05/2007
Points
  5
31st May, 2007 at 21:58:21 -

I tried that, but for some reason something isn't working. I can't believe I can't figure this out!! *cries* It seems so simple...

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
1st June, 2007 at 02:41:02 -

I dunno, but it might be one of the other events in there messing up. Like the "is stopped" part. To check if things would actually work, just start with one event (global value == 1) and then start adding the other events to it to see where things go wrong.

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click