Jump to content

My static meshes 'Cannot be moved' ... what?


EPDGaffney

Recommended Posts

 

... what's very odd is that spawning another object with the same base ID will spawn one that I can move and turn using SetPos and SetAngle. So it's not the NIF or what its Type is in the GECK. In my experience so far, this has happened only with objects of the Static form type.

Did you compare flags between the "unmovable" object and the newly spawned one? "Obstacle", "Visible When Distant", or "Has Tree LOD" for instance?

 

-Dubious-

 

 

There is no such flag on a static. And frankly I am not certain statics can be slid along a plane.

 

But it seems I did , and cannot think why you couldn't ?

 

Console commands ??? Ure on your own

Link to comment
Share on other sites

But I think I've just realised the problem: it's scaled. This engine gets a bit weird about that. Have to test and google.

 

What was scaled ? You mean cuz something got shrunk or made larger ? It then caused a glitch ?

IDK maybe ?

 

I think you just haven't figured out how that move script works. And you are upset by it ?

 

A add 1 = B , B add 1 == C ... A to B to C

Link to comment
Share on other sites

Sorry I didn't mean to offend if I did ... sometimes I just shouldn't read and try to respond when drinking ... oy~veh :\

 

But I remembered Uhmatt had made me a script for moving a reference along with a creature ... hence another way to move an object , would be to place this script on an actor (npc or creature) having its AI do the moving. Which I think they could be invisible , so you don't see them , just the object.

 

Hope he doesn't mind me posting it public , but then again ... all his other scripting is basically public from his mod download.

 

~~~~~~~~~~

 

 

Scn UmExampleGunnerScript


Ref MyRef
Ref GunnerRef
Short DoOnceA
Short posx
Short posy
Short anglez
Short anglezGunner
Short PosZGunner


begin gamemode

if DoOnceA == 0
set Myref to Getself
Set GunnerRef to GetLinkedRef
set DoOnceA to 1
endif

if(DoOnceA>0)

If GunnerRef.GetDead
Return

Else
set posx to Myref.getpos x
set posy to Myref.getpos y
set anglez to Myref.getangle z
set anglezGunner to GunnerRef.getangle z

set poszGunner to Myref.getpos z + 57
set posx to posx - ( 55 * (sin anglez))
set posy to posy - ( 55 * (cos anglez))

GunnerRef.setpos x posx
GunnerRef.setpos y posy
GunnerRef.setpos z poszGunner
endif
endif

End

 

 

I'm a bit foggy on the actual mechanics of it ... so if need be , I think uhmatt would offer some explanation ?

Link to comment
Share on other sites

Offended, not so much, but certainly confused. A lot of what you said had already been discussed earlier. Like, a script based on SetPos wouldn't work on an object that simply returns the message 'Cannot be moved' when you try to use SetPos on it. And then the suggestion that I didn't understand the script is, you know, a little humorous, given both my understanding of scripting in general and the fact that my script that wasn't working was exactly the same as yours but using rotation instead of motion.

 

So, what I had forgotten was that the last time I'd seen that message, the object was scaled to 10 in the editor. This time, I didn't even remember that this wasn't the default size, but it's not, and it was scaled to 0.2. So my script using SetAngle did nothing, but it was definitely running because it played all the sounds and clearly ran through the whole script without crashing. There's a good chance that every time this has happened, it was because the object was scaled. Seems the engine can't move things (at least statics) that are scaled. Using SetScale 1 doesn't seem to fix it. Fortunately, there's a Rotate function and it works fine here.

 

I get uhmatt's script. I don't quite get the offset of the thing that the script is moving or why, but I understand how the script is working. Thanks.

Link to comment
Share on other sites

The script was from an attempt to have a gunner standing in the bed of a pickup. (It works, but kicks the vehicle around, and the AI doesn't know what to make of it). Anyway, the offset just adjusts where the gunner is in relation to the vehicle.

 

My question though is why bother using a script to animate the crank when you could more easily use an animated static. You'd still need a script, but you'd probably just need to run an OnActivate block that plays the animation and triggers whatever the crank's supposed to do. (Anim statics can also trigger sounds by themselves)

 

https://www.nexusmods.com/fallout3/mods/9700

Link to comment
Share on other sites

I had a feeling that script was something like that (some ref positioned near another one and needing to remain so as the latter moved).

 

Well, why I didn't use an animated static is that with a script that works, it's much easier for me. I'm sure that some people would find it easy enough to make an animation but that's a whole new learning curve for me in this engine and with the scripting method, I just need to type the same number of lines to get it to work. Also, as it reaches certain angles, it triggers 'suspense events' round the player. Suppose that could be done with a timer but then I'd need to test and see how long it takes the crank to reach different angles anyway.

 

The error was because it's scaled, but with Rotate, the script works beyond fantastically (I also have the building falling down round the player and everything being set on fire, so I'm more happy about that stuff at the moment).

Link to comment
Share on other sites

If scripting it is easier for you, then that works, but I can tell you that I went into that tutorial i linked with pretty much zero knowledge of Blender and came out of basically just skimming it about 2 hours later with a UFO that can take off, land, hover, and attack. (I'll try to avoid the shameless self promotion of linking to it yet again.) You, on the other hand have the benefit of prior Blender knowledge and a much simpler animation to start on. There's never any harm to learning a new skill.
Link to comment
Share on other sites

If scripting it is easier for you, then that works, but I can tell you that I went into that tutorial i linked with pretty much zero knowledge of Blender and came out of basically just skimming it about 2 hours later with a UFO that can take off, land, hover, and attack. (I'll try to avoid the shameless self promotion of linking to it yet again.) You, on the other hand have the benefit of prior Blender knowledge and a much simpler animation to start on. There's never any harm to learning a new skill.

 

Blasphemy ... No ... I won't use the blendA~

Have to keep my geck skiLLz~ pure :pirate:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...