Game Development Community

What is a "mounted image"

by Mike Stoddart · in Torque Game Engine · 06/14/2002 (7:20 pm) · 10 replies

Could someone explain what a "mounted image" is please? Knowing nothing about it, and taking a shot in the dark, it sounds like it's a means of modifying the player's 3d model/weapon to show how much ammo he is carrying - like when he's carrying a "mounted" flag in capture the flag.

Am I even close?!

I have this code in rifle.cs from a resource, but I'm not sure exactly what it's doing:

// The ammo inventory state has changed, we need to update any
	// mounted images using this ammo to reflect the new state.
	for (%i = 0; %i < 8; %i++) {
		if (%image == %obj.getMountedImage(%i))
				%obj.setImageAmmo(%i,true);
	}

Thanks

#1
06/14/2002 (7:28 pm)
Ok, a "mounted" image is a model thats loaded into 1 of 8 "slots" on the player model. Typically this is a gun, I also have a steam emitter, a flag (for example) and other shapeimage based objects.

So what the typical use is, is that you have an Item based object in the world, when touching this, you then mount a shapeimage based object onto the player. So the crossbow in RW is an Item, when mounted on a player its an image.

Phil.
#2
06/14/2002 (7:34 pm)
Ah I see. Now I recall reading about those player slots. Can you think of a need to use these mounted images for WW2 weapons? I can't think of any way that I would need them. All of the player ammo is abstracted into clips hidden on the player's person, say in pockets or pouches.

Thank you so much.
#3
06/14/2002 (7:42 pm)
For your weapons yes you would use mounted imaged. You shouldn't need it for your ammo.

Basically, if you want a player to be able to pick it up, and you want to be able to see it attached to a player, you need it.

Unless of course you make your own class.
#4
06/14/2002 (7:45 pm)
Excellent - thanks.
#5
06/15/2002 (3:30 am)
Ok, typical example of mounted images I'd use for a WW2 scenario.

1) Weapon
2) Backpack (det charge or whatever)
3) Radio
4) Helmet (perhaps not, but if you wanted to be able to shoot it off it might be helpful).
5) Body (if you were to pickup a teammate and sling him over your shoulder).

That kinda thing :))

Phil.
#6
06/15/2002 (1:47 pm)
Excellent ideas Phil; especially the backpack and radio.
#7
03/03/2003 (10:58 am)
It seems like the mMountedImageList member of ShapeBase is hard-wired for weapons. Doesn't this limit the way in which in can be used?

Why use a ShapeImage when you can just mount a ShapeBase derived object to one of the mount points using the mMount member?

Some of the answers here are confusing. I thought weapons were mounted to the player using the mMount.

Can someone please clarify?

I am considering removing mMountedImageList from ShapeBase. Our game does have players carrying weapons and killing each other, not there is anyhing wrong with that. :)

Mark Harmon
#8
03/03/2003 (11:00 am)
mMount would be the players mount. Horse, motorcycle, spaceship, something that HE is mounted to.
#9
03/03/2003 (11:27 am)
I see. So the mounted images are what is mounted to the player. The name "images" always confuses me because I think it's a billboard or sprite, not a 3d shape.


What is the list member of mMount used for? Looking at the code, it seems like it could also be used for mounting objects.

// Mounted objects
struct MountInfo {
  ShapeBase* list;   // Objects mounted on this object
  ShapeBase* object; // Object this object is mounted on.
  ShapeBase* link;   // Object link of next object mounted to this objects mount
  U32 node;          // Node point.
} mMount;
#10
09/21/2003 (8:09 am)
Uhmm....what about armour ?
With body do you mean something like that ?

My real question is : creating an armour shape I wold like
to make a single model, but I think that if my player
sit, the armour on the back doesn't fit the body of player,
that's beacause the armour is rigid instead of the body.

It's true ?
It's possibile that the armour fit the body in any position
and follow it in the animations ?