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: 2234
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Attach(character) question.

Post by Yukiko » Sat Aug 12, 2017 8:14 pm

Under what circumstances and what type of script(s) might I want to use this function?
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

DevGIB
Grandmaster Poster
Posts: 153
Joined: Mon Feb 06, 2006 6:12 am

Re: Attach(character) question.

Post by DevGIB » Sat Aug 12, 2017 10:18 pm

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: 2234
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Attach(character) question.

Post by Yukiko » Sun Aug 13, 2017 12:01 am

I've never seen a skill script actually call the Attach() function though.
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

User avatar
CWO
POL Expert
Posts: 1129
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Re: Attach(character) question.

Post by CWO » Sun Aug 13, 2017 1:19 am

Skill scripts are automatically attached by the core along with item use scripts.

Turley
POL Developer
Posts: 628
Joined: Sun Feb 05, 2006 4:45 am

Re: Attach(character) question.

Post by Turley » Sun Aug 13, 2017 3:27 am

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: 2234
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: Attach(character) question.

Post by Yukiko » Sun Aug 13, 2017 9:25 pm

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. ;)
Sincerely,
Yukiko

I would tell you a UDP joke but you might not get it.

Titus 2:13

User avatar
CWO
POL Expert
Posts: 1129
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA
Contact:

Re: Attach(character) question.

Post by CWO » Sun Aug 13, 2017 9:38 pm

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

Who is online

Users browsing this forum: No registered users and 2 guests