Skip to content

Manual:DIL Manual beginedit()

iamnove edited this page Jan 18, 2023 · 55 revisions


Function:  beginedit ( u : unitptr);
  u
         the PC unit doing the editing
  return
         When done  editing it returns SFB_EDIT and activator is set to PC
The 'BEGINEDIT' function sets a PC into editing mode.  while in edit mode
the PC field 'editing is set to true.  Once the PC is done editing a 'SFB_EDIT'
message is sent to the unit editing to continue on with the DIL.
If for some reason the PC needs to break
out of the editor before it is done editing then the Dil needs to call
the 'killedit' function
interrupt editing before done
example:

---~---~---~---~---~---~---~---~---
dilbegin edextra ();
var
        temp:string;
code
{
        beginedit (self);
        wait(SFB_EDIT,self==activator) ;
        temp:=textformat(argument);
        addextra (self.extra,"general",temp);
        quit;
}
dilend
---~---~---~---~---~---~---~---~---

The previous DIL is an example of how you could make a command to set the
general extra which is the characters description when you do 'look player'


---~---~---~---~---~---~---~---~---
Clone this wiki locally