Is there a way to set the NPC picture similar to the way the "set hero picture" command works? I feel like this should have been in the dictionary but it's not. Is there a way I could mimic this command in such a way that does not destroy the NPC that I want to change the sprite picture of?
I ask because I'm controlling an NPC for the purpose of a 2nd player. I have a whole bunch of other scripts which rely on that NPC remaining as NPC ID#22 no matter whether the NPCs sprite is to be changed.
EDIT: I see I might be able to use "change NPC ID (reference,new ID)" but my main concern is that I have a hitbox bound to NPC ID#22. If I want this hitbox on the new ID NPC would I need to initialize the hitbox again and again? For instance every time my NPC character jumps or climbs a ladder or swims she still requires her hitbox, so will I have to continually bind the hitbox to her every time her sprite changes?
Set NPC picture?
Moderators: marionline, SDHawk
- sheamkennedy
- Liquid Metal Slime
- Posts: 1110
- Joined: Mon Sep 16, 2013 9:29 pm
- Location: Tama-shi, Tokyo, Japan
- Contact:
Set NPC picture?
Last edited by sheamkennedy on Fri Mar 25, 2016 6:51 am, edited 1 time in total.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
- FnrrfYgmSchnish
- Metal Slime
- Posts: 741
- Joined: Thu Jun 18, 2009 4:37 am
- Location: Middle of Nowhere
- sheamkennedy
- Liquid Metal Slime
- Posts: 1110
- Joined: Mon Sep 16, 2013 9:29 pm
- Location: Tama-shi, Tokyo, Japan
- Contact:
Oh thanks, I must have overlooked that completely. That should be what I need. I'll try it tomorrow when I wake up. Thanks for the quick response.FnrrfYgmSchnish wrote:"Alter NPC" is the command for changing NPC pictures (and a whole lot of other things), if I'm remembering right. I'm guessing that's why there's no "Set NPC Picture" -- Alter NPC already does that and also walk speed, walk type, and so on.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
Code: Select all
set sprite set number (lookup slice(sl:walkabout sprite component, get npc slice(NPC reference(22))), record)
Might I also recommend adding a hero to the party and then disabling caterpillar mode instead of using an NPC? You may be too deep to make a change as drastic as that now, but it may prove to help with the organization of everything in the long run.
My pronouns are they/them
Ps. I love my wife
Ps. I love my wife