Author Topic: About LINE opcode.  (Read 15634 times)

Synergy Blades

  • Guest
Re: About LINE opcode.
« Reply #25 on: 2007-03-20 00:09:25 »
1) Yes... I think that's right. Of course for Script 4 you can't really test this with a field object, because to produce it the entity must be solid (see point 3), but if you try it with a LINE such as a save point, script 4 only works right in the very center of the line, whilst script 3 (and indeed 5 to 7) activates right along the line. So I think this is a reasonable assumption.

2) 4 to 7 don't seem to work with field objects, as you suggest, solid or not. This isn't like point 1, where it only works in the center of the object/line, because if you try these scripts on the LINE they work anywhere along it, unlike with Script 4 where you have to be right in the center. So yes, LINE only.

3) If it's not solid (i.e SOLID(1)) none of these special scripts activate. That's why save points have an extra entity using a LINE to do the dialog and sound they produce.

Akari

  • *
  • Posts: 766
    • View Profile
Re: About LINE opcode.
« Reply #26 on: 2007-03-21 09:43:37 »
1) Yes... I think that's right. Of course for Script 4 you can't really test this with a field object, because to produce it the entity must be solid (see point 3), but if you try it with a LINE such as a save point, script 4 only works right in the very center of the line, whilst script 3 (and indeed 5 to 7) activates right along the line. So I think this is a reasonable assumption.

2) 4 to 7 don't seem to work with field objects, as you suggest, solid or not. This isn't like point 1, where it only works in the center of the object/line, because if you try these scripts on the LINE they work anywhere along it, unlike with Script 4 where you have to be right in the center. So yes, LINE only.

3) If it's not solid (i.e SOLID(1)) none of these special scripts activate. That's why save points have an extra entity using a LINE to do the dialog and sound they produce.

mmm I still don't see whole picture =(

In case of line: whats the difference between 3 and 6? They both works OnEnter... whats the difference?

What do you mean by the very center of the line? (Line 1---------2---------3) It only activate when you reach point 2 and not activated when you reach 1 or 3? And does this includes solid range of PC entity or not?

And I have one more question, does line have talk range and can it be talked to?

Please write the all auto script activation for line and field object.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: About LINE opcode.
« Reply #27 on: 2007-03-21 20:41:58 »
I think he means when the center of the characters body crosses the line. That would be my guess.

Cyb

Synergy Blades

  • Guest
Re: About LINE opcode.
« Reply #28 on: 2007-03-21 21:35:03 »
I ought to start by saying that I think a line has a designated talk and solid range (that cannot be changed with SLIDR/TALKR, I tried). It's only a small amount, but it's enough that it makes sense to be able to "enter" and "leave" a line (or more precisely, its range) and talk to it from a specific distance.

Quote
What do you mean by the very center of the line? (Line 1---------2---------3) It only activate when you reach point 2 and not activated when you reach 1 or 3? And does this includes solid range of PC entity or not? And does this includes solid range of PC entity or not?

Seems I wasn't quite right on script 4. It's the center point of the character object that has to enter the line, i.e this disregards the Solid Range of the object entering the line.

Quote
whats the difference between 3 and 6?

3 activates once when you move within the line range; when you stop, then move again, it activates again. With 6, it activates once when you are within the line range, but you have to leave the line area and then re-enter it for it to activate again. This stops it from repeatedly activating whilst you move along the line.

Quote
And I have one more question, does line have talk range and can it be talked to?

You can talk to a line, but it does not have a talk range (TLKR has no effect). So I suppose talk range is tied to the field object whilst lines have a predetermined talk range, which is probably the same as its "solid range" used for entering/leaving the line.

So in the end I think it boils down to this:

Line

  • 1: Init
  • 2: OnTalk - the talk button has been pressed with the character on the line's range; script activated once.
  • 3: OnMove - the character has moved whilst on the line; script activated once. Move again on the line, and the script activates again.
  • 4: OnCenter - the center point of the player object has moved on the line; script activated once. Move again on the line, and the script activates again. Disregards solid range.
  • 5: OnInside - the character is on the line range; script activated repeatedly, once every frame.
  • 6: OnEnter - the character has entered the line area; script activated once. Move again on the line, nothing happens. Must exit and re-enter line range for effect to occur again.
  • 7: OnLeave - the character has left the line area; script activated once. Move again on the line, nothing happens. Must exit, re-enter, and re-exit the line range for effect to occur again.

Object

  • 1: Init
  • 2: OnTalk - the talk button has been pressed; script activated once.
  • 3: OnMove - the character has moved onto/touched the edge of the solid range; script activated once. Move again whilst still on the edge of the solid range, and script activates again.

OnCenter cannot be used because the center of the player character object cannot reach the solid object; OnInside, OnEnter and OnLeave also do not work with objects, only with lines.


If I seem vague or it seems like I'm not answering your question, my apologies, it's mostly because I am unsure myself.  :-D Not always easy to explicitly say what it appears to be doing by observation.
« Last Edit: 2007-03-21 21:48:55 by Synergy Blades »

Akari

  • *
  • Posts: 766
    • View Profile
Re: About LINE opcode.
« Reply #29 on: 2007-04-11 11:45:58 »
Hello again Synergy Blades =)

Can you try to guess at which priority scripts run. Cause they seems not run at priority 0. There are a lot of conflict when i try to run some script and this priority already taken.

Please try to run cycled script in some slot and watch if script activation runs or not. We only know that slot 7 are reserved for initialisation base script.

Synergy Blades

  • Guest
Re: About LINE opcode.
« Reply #30 on: 2007-04-11 23:56:44 »
I assume you mean LINE scripts, when executed by a field object crossing? I put a cycled request in the director script, that executed the script from the line entity which when crossed, plays a sound and waits for about a second. So I can hear once a second or so the save point sound. If you cross the line, the sound plays instantly, no matter what stage of execution the cycled sound is at. So would it be right to say the line script runs at top priority, like the initialisation?

Akari

  • *
  • Posts: 766
    • View Profile
Re: About LINE opcode.
« Reply #31 on: 2007-04-12 05:15:19 »
I assume you mean LINE scripts, when executed by a field object crossing? I put a cycled request in the director script, that executed the script from the line entity which when crossed, plays a sound and waits for about a second. So I can hear once a second or so the save point sound. If you cross the line, the sound plays instantly, no matter what stage of execution the cycled sound is at. So would it be right to say the line script runs at top priority, like the initialisation?

Mmm.... I dont understand what you did =)

Two tests:

Create entity with line.
Start cycled script at slot 2 (OnEnter) with priority 0
Then enter this entity.
Result?

Create entity with line.
Start script at slot 2 (OnEnter) with priority 0 and make it wait for something. (Message for example)
Then enter this entity.
Result?

Akari

  • *
  • Posts: 766
    • View Profile
Re: About LINE opcode.
« Reply #32 on: 2007-10-16 13:20:34 »
I finalize the info about script activation. I finish reversing this part of code.
Everything Synergy Blades talk was true.

Quote
Line

    * 1: Init
    * 2: OnTalk - the talk button has been pressed with the character on the line's range; script activated once.
    * 3: OnMove - the character has moved whilst on the line; script activated once. Move again on the line, and the script activates again.
    * 4: OnCenter - the center point of the player object has moved on the line; script activated once. Move again on the line, and the script activates again. Disregards solid range.
    * 5: OnInside - the character is on the line range; script activated repeatedly, once every frame.
    * 6: OnEnter - the character has entered the line area; script activated once. Move again on the line, nothing happens. Must exit and re-enter line range for effect to occur again.
    * 7: OnLeave - the character has left the line area; script activated once. Move again on the line, nothing happens. Must exit, re-enter, and re-exit the line range for effect to occur again.


Object

    * 1: Init
    * 2: OnTalk - the talk button has been pressed; script activated once.
    * 3: OnMove - the character has moved onto/touched the edge of the solid range; script activated once. Move again whilst still on the edge of the solid range, and script activates again.

Little addition:
Visible entitys OnTalk only work with first entity that wish to activate script. All others will be skipped.
Lines activate all OnTalk request.
Lines OnTalk activates during move. If your coordinates not changed - OnTalk will not be activated.

All sctipts starts at priority 1. Like all other requests if entity already execute script with higher or same priority - request will be skipped.

I think this is topic is finished =)

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: About LINE opcode.
« Reply #33 on: 2007-10-18 23:28:32 »
First of all I am glad people are still working in spite of loosing our fearless leader <TM>
:D

As I am uncertain where to start I started by getting OGRE demo's compiling on my machine.

Erstwhile (back to what you were speaking of).  Interesting it looks like it fires an event and the first object catches it.
This is kind of like Kingdom Of Kroz coding (early 90's game on the PC) with objects. I am now suspicious of how the script code was generated.

My guess is it's not entirely written script code i suspect they may have made some tools for making things work.
In general I throw debug code into my stuff to spew out things when needed/wanted or desirable.
Have either Akari or G found said code? From my perusal of FF7's it appears there is some in there (printf format specifier strings appear in the program). These go out to the console correct?  Hmmm

Cyb