Author Topic: Stuck on the basics.  (Read 3370 times)

Superslash2

  • Iokan (+1)
  • *
  • Posts: 3
    • View Profile
Stuck on the basics.
« on: October 27, 2006, 04:12:20 pm »
I know this might sound stupid to all of you but this has been botering me for sometime now. I finished reading the material on creating NPCs and makign them talk amongst themselves (that one involving Bandeau). I then went over it, made a few notes and tried making a new NPC in Gato's Area. I deleted Gato and put in an NPC. Gato was still there and my NPC wasn't. I then tried putting it in The Millenial Fair (bottom part) and it didn't come up either. I then thought I should add the Animation Command since it was mentioned in the tutorial (but it doesn't show up in the list). it didn't work. I tried altering the Events Tab that comes under location but that just glitched the area.

I then opened the other tutorial that involves making NPCs which takes place in Gato's Area and tried to edit that. I added the NPC and the colours are odd, just like with Johnny. But finally the image came up. But now whenever I enter the area, the Taban character starts talking automatically instead of waiting for me to press A. I can still move while he's speaking. How do I fix this? Also, if anyone could tell me why the other areas weren't working, I'd appreciate it.

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: Stuck on the basics.
« Reply #1 on: October 27, 2006, 04:14:00 pm »
Is the textbox under "Activate" or "Arbitrary0"? Arbitrary0 starts off immediately; that could be the issue. At any rate, taking a screenshot of the code usually helps. Just press printscreen, paste in MSPaint or a program of your choice, save the important part and use the Compendium's forum attachment system to post it. It'll help things tremendously.

Superslash2

  • Iokan (+1)
  • *
  • Posts: 3
    • View Profile
Re: Stuck on the basics.
« Reply #2 on: October 27, 2006, 06:36:35 pm »
No, my NPC doesn't have any other code than the stuff it seems to need to appear in the game. I am adding the NPC to the Temporal Flux NPC Tutorial from this site. The area I'm adding it in is Gato's Area. That's all. But what has happened is Taban's text that normally comes under Activate now seems to come under Standup / Idle. As soon as I enter Gato's Area, Taban starts his speech rather than waiting for me to press A when next to him. I'll post my code but I don't think it will help in this case.

[attachment deleted by admin]

ZeaLitY

  • Entity
  • End of Timer (+10000)
  • *
  • Posts: 10797
  • Spring Breeze Dancin'
    • View Profile
    • My Compendium Staff Profile
Re: Stuck on the basics.
« Reply #3 on: October 27, 2006, 06:53:55 pm »
Even if an NPC just sits there, you need to have a "return" under both activate and arbitrary0, if that helps.

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: Stuck on the basics.
« Reply #4 on: October 27, 2006, 07:01:17 pm »
I'm not sure about your Taban, but for this Nun, the code is missing 2 mandatory things:

- an End command at the end of Startup/Idle
- a Return command in Arbitrary0

"Activate" is the code which is ran when you talk to the NPC, and "Arbitrary0" is the code which is ran when you push or touch him. If there's nothing in the Activate code, the game will go to Arbitrary0 instead. If there's nothing in Arbitrary0, the game will glitch. That's why the Return must be put at least in Arbitrary0 (or in both Activate and Arbitrary0 to be sure).

Superslash2

  • Iokan (+1)
  • *
  • Posts: 3
    • View Profile
Re: Stuck on the basics.
« Reply #5 on: October 27, 2006, 07:25:24 pm »
It works now. I forgot about putting in End and I didn't know about putting in Return for Arbitrary 0. Thanks alot.

Also, sorry for wasting your time but what does Return actually do if it doesn't end the code?

Chrono'99

  • Guru of Reason Emeritus
  • God of War (+3000)
  • *
  • Posts: 3605
    • View Profile
Re: Stuck on the basics.
« Reply #6 on: October 27, 2006, 07:36:45 pm »
Don't worry, we're here to help. "Return" is just the way to tell the game to stop running the code. If the command isn't put, the game just continues reading the code downward, and downward, and downward...

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Re: Stuck on the basics.
« Reply #7 on: October 30, 2006, 09:22:30 am »
More technically, "return" tells the object processing code the current object is finished for now, but keep processing it.  "End" tells the code that this object is finished and stopped.  "Break" tells the code to stop processing the object for now, but come back to this spot when it picks back up.

In the vast majority of situations, you want to use "return".  Also, when "end" appears in startup, it does not mean much since it will only stop for startup processing.  All other processing still works fine.  During normal processing, "end" will only stop Idle, Activate, and Touch (Arb0) from responding.  Any arbitrary can still be called manually.

Course, it has been a couple of years since I have looked at the disassembly to these commands, so my memory may be shaky.

---T.Geiger