Author Topic: Spawning multiple debris/shells  (Read 4290 times)

Wait... is a few shells falling out(like the shotgun) all you want?
I bet he didn't want the Blockhead to stuff shells

The reason it's spawning from the player is because %obj is the player object. To correct the position, use
Code: [Select]
%pos = %obj.getMountedObject(%slot).getPosition();

If %slot doesn't work for some reason, just change it to 0.

What? Nonono, mounted images are not the same as mounted objects. Use %pos = %obj.getMuzzlePoint(%slot) or %pos = %obj.getMountPoint(%slot); , there might be something like %pos = %obj.getEjectPoint(); too, but im not sure.

What? Nonono, mounted images are not the same as mounted objects. Use %pos = %obj.getMuzzlePoint(%slot) or %pos = %obj.getMountPoint(%slot); , there might be something like %pos = %obj.getEjectPoint(); too, but im not sure.
Ugh, sorry, do what boodals says. I can never keep the get<InsertThingHere>(); functions straight. I'll figure it out someday...

%pos = %obj.getMuzzlePoint(%slot)
is what i decided to use when this thread died despite it not being perfect, getMountPoint and getEjectPoint apparently don't exist.

getMountPoint and getEjectPoint apparently don't exist.
You need to be sure that you have the nodes in the model before exporting for these. Iirc they have to be named like the muzzlePoint so mountPoint and ejectPoint. mountPoint being your hand and ejectPoint being where the shells eject.

You need to be sure that you have the nodes in the model before exporting for these.
...yes i am sure that the nodes exist, i know what they do
the function does not exist; try it yourself

...yes i am sure that the nodes exist, i know what they do
the function does not exist; try it yourself

Try dumping the player and take a look through, it might exist under another name, idk.

Try dumping the player and take a look through, it might exist under another name, idk.
Uhh dumping the gun's object you mean?

Uhh dumping the gun's object you mean?

The gun does not have an object. The gun does not exist in space. The ShapeBaseImageData is just rendered on a certain mount point of your player. There is no "getEjectPoint" or something similar, regardless of whether or not the ejectPoint node exists.

At this point it might just be easiest to set a constant offset from the origin or muzzle point of the gun itself.