Modifications => Nod SDK Mods => Wodal Mod => Topic started by: ORI on 2007-09-18, 15:54:39

Title: Attach
Post by: ORI on 2007-09-18, 15:54:39
Does attach only works for particle effects? Is there any chance it works for item and props templates as well?
Title: Re: Attach
Post by: Javokis on 2007-09-19, 10:18:15
I wouldn't recommend it as a permanent attachment. You can do that, and in 0.3a you'll have several options of accomplishing it, but be very careful. Attaching a modeled object to someone will cause crashes in scripted chronicles and in some cases non-scripted chronicles doing 'jump' sequences.

Do not under any circumstances allow players with model attachments to be 'jumped' to a new location. They can walk through exits all they want, but an automated jump on the side of the chronicle or by the storyteller interface can cause crashes if players are having 'modeled attachments' to them. This is a game engine problem and cannot be corrected by Java scripting.

NOTE: The reason I know this is because in E-Mod 1.8's early stages I had did wearable helmets, which don't have any problems in single player, but crashes in multiplayer when I was testing Leaves of Three. I later found out it was the combination of wearing a helmet and being 'jumped' at the same time that caused the crash.
Title: Re: Attach
Post by: ORI on 2007-09-19, 11:32:38
I thought it might be a good way to move objects when using Movement of the mind powers,  for weapons I simply spawn a actor with no model and do a weapon override to use weapon template and possess it, I thought to do something similar only attaching the template instead of doing weaponoverride to equip it, I might have to use flight for items that are not weapons then, better than to risk something turning unstable
Title: Re: Attach
Post by: Javokis on 2007-09-19, 12:51:30
Well the crash only occurs if the object is attached to a player (A client or host) in multiplayer. If all you're doing is attaching an object to an NPC then go ahead and do so. The engine will be fine - well... I think, but 0.2a will have alignment issues with the weapon. 0.3a should correct most of the alignment issues.

Hmm... now that I think about, I did have to do some additional fixes in 0.3a to allow an existing object to be attached to another object. Oh yeah. You can't do that 0.2a. I've been so caught up in fixing some other bugs that I forgot I added completely new features to the attach command. Actually the attach command in 0.3a is removed and replaced with three new attach commands. All of them are documented.

I attached the new documentation below to give you a heads up. 0.3a should be ready by this Friday with or without Animalism.