S
Ok. I'll add this to my todo. But... hmm I didn't know that we could define a lot of lines in one entity. Is this used somewhere?Akari: added SLINE which may be of interest since you have implemented LINE, I think. Of note is that whilst you can define multiple LINEs in one entity as mentioned previously, SLINE only allows you to update the first defined LINE; multiple calls to SLINE will still only update the first one.
Next: What will happened if I define two or three lines in entity?
Don't worry about it, I'd say it's an undefined behaviour.Yes, one entity can define multiple LINEs and they will each exist & execute the relevant script, so there's no cancelling out of previous definitions.
Ups sorry. I didn't notice that (or forgot it). ^^''No, it's not used in the game as far as I know, but you did ask up there ^....
Next: What will happened if I define two or three lines in entity?Don't worry about it, I'd say it's an undefined behaviour.Yes, one entity can define multiple LINEs and they will each exist & execute the relevant script, so there's no cancelling out of previous definitions.
I have few more question about it.Script 2: Activates once when a button is pressed.
Script 3: Activates once when you move into the object/line. When you stop, and then move again, the script activates (provided you're still in the object/line, of course).
Script 4: Not sure. Seems similar to 3
Script 5: Activates repeatedly whilst you are on the object/line.
Script 6: Activates once when you move into the object/line; will not reactivate until you leave and re-enter.
Script 7: Activates once only when you have left the object/line.
mmm I still don't see whole picture =(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.
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.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?
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.whats the difference between 3 and 6?
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.And I have one more question, does line have talk range and can it be talked to?
Mmm.... I dont understand what you did =)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?
Little addition: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.