Attach(character) question.

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.

Moderator: POL Developer

Post Reply
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Attach(character) question.

Post by Yukiko »

Under what circumstances and what type of script(s) might I want to use this function?
DevGIB
Grandmaster Poster
Posts: 248
Joined: Mon Feb 06, 2006 6:12 am

Re: Attach(character) question.

Post by DevGIB »

For characters i believe actions that the character performs should be attached to that character.
For example if they are using a skill or casting a spell it should be attached.
As a player can only have 1 script attached at a time it stops them from being able to do multiple things at once.

I figured timed scripts like poison controls could also be attached to a player, however looking through a few script bases i can't see many that take advantage of it so i can't help but feel it might have been a legacy function.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Attach(character) question.

Post by Yukiko »

I've never seen a skill script actually call the Attach() function though.
User avatar
CWO
POL Expert
Posts: 1158
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Attach(character) question.

Post by CWO »

Skill scripts are automatically attached by the core along with item use scripts.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: Attach(character) question.

Post by Turley »

I wouldn't call it a legacy function. The usecases are limited sure, but since we have the possibility to detach a script we should also have the possibility to attach one. So the purpose is symmetry ;)
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Attach(character) question.

Post by Yukiko »

Ah.
I like symmetry.
:)

I just can't think of a use case off the top of my head. Time to do a ZTree search of the 45+ shards I have on file to see if anyone has Attach'ed a script to a player character. ;)
User avatar
CWO
POL Expert
Posts: 1158
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: Attach(character) question.

Post by CWO »

I've used it when debugging stuff or creating new stuff to replace existing. Like some item use scripts that I would start off as developer level commands and such. If it fits your scripting style and situation, it can be useful.
Post Reply