Replies: 4 (Who?), Viewed: 266 times.
Lab Assistant
Original Poster
#1 Old 16th Sep 2021 at 1:32 AM
Default Itens being spawned during animations
Got a idea to remove part of the difficulty in using my Swordfighting mod. I thought about using a customized version of the SPN wands, turning them into swords and weapons in general. If I manage to do this, I will give users the tools to make their own weapons, but I don't know how exactly to make their models appear during the animations. I've examined the wand code, but couldn't find which line perfomed this function.
Advertisement
Lab Assistant
#2 Old 17th Sep 2021 at 1:35 AM
Quote:
Originally Posted by CyrusBanefort
Got a idea to remove part of the difficulty in using my Swordfighting mod. I thought about using a customized version of the SPN wands, turning them into swords and weapons in general. If I manage to do this, I will give users the tools to make their own weapons, but I don't know how exactly to make their models appear during the animations. I've examined the wand code, but couldn't find which line perfomed this function.


If I'm not mistaken it'd be:
base.SetActor("wand", this.mWand);
inside the Run() method of CastSpell.
Where mWand is defined elsewhere in MagicWand class as:
public MagicWand mWand;
Someone might have a more decent explanation though.
Lab Assistant
DELETED POST
Original Poster
18th Sep 2021 at 4:22 PM
This message has been deleted by CyrusBanefort.
Lab Assistant
Original Poster
#3 Old 18th Sep 2021 at 7:19 PM Last edited by CyrusBanefort : 18th Sep 2021 at 7:29 PM.
Thanks for your answer.
So, checking this method of spawning the "sword", I noticed I need to have animations for the item. I thought about something that could simplify the process. Perhaps I could create a item that would inform the interaction about a cas part that would be added to the sim when the two actors entered their combat stances. This CASP would be assigned by the player through a self interaction, specific for each sim, like in Arsil sunglasses mod. is this possible? How could I do this?

I examined a bit of Arsil's code, seeing that the casp is associated to a certain string. How could I make each sim have a individual version of a string?
Lab Assistant
#4 Old 20th Sep 2021 at 3:52 AM
Quote:
Originally Posted by CyrusBanefort
Thanks for your answer.
So, checking this method of spawning the "sword", I noticed I need to have animations for the item. I thought about something that could simplify the process. Perhaps I could create a item that would inform the interaction about a cas part that would be added to the sim when the two actors entered their combat stances. This CASP would be assigned by the player through a self interaction, specific for each sim, like in Arsil sunglasses mod. is this possible? How could I do this?

I examined a bit of Arsil's code, seeing that the casp is associated to a certain string. How could I make each sim have a individual version of a string?


Ooh, I will really need to check out arsil's code. I am not familiar with adding strings individual to a sim, I can just think of doing so for objects however you could try repurposing some of the wand code and perhaps have your object be an inventory object and then just do a check of the sim inventory so that it spawns the right model? At least I'd think it easier.
Wish Arsil was here still.
Lab Assistant
Original Poster
#5 Old 20th Sep 2021 at 3:14 PM
Quote:
Originally Posted by SonyaYU
Ooh, I will really need to check out arsil's code. I am not familiar with adding strings individual to a sim, I can just think of doing so for objects however you could try repurposing some of the wand code and perhaps have your object be an inventory object and then just do a check of the sim inventory so that it spawns the right model? At least I'd think it easier.
Wish Arsil was here still.


That's a good idea. How exactly could I call the object's string value in the code, then add the CASP? With what I already know, I can only manage to add the CASP to one of the actors in the Spar interaction.
Back to top