Thanks!
Weapons bound to character
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am
Weapons bound to character
Hello!
How would I go about making weapons that are only usable by certain characters and nobody else?
Thanks!
Thanks!
- Sophia
- Concise and Honest
- Posts: 4308
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Weapons bound to character
The simplest approach is probably to define a rend_method_check function for the weapon's arch. A return value of false is treated as though the weapon had no attack methods, while true uses the weapon's normal attack methods. It takes the weapon's id as its one and only parameter, so to only make it work with certain characters you can dsb_fetch its location and see whose inventory the weapon is in and return values accordingly.
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am
