Game Development Community

Hiding a marker.

by Chris "Dark" Evans · in Torque Game Engine · 12/19/2001 (2:59 am) · 2 replies

In my game I'm going to use a marker set in the editor as a shop. When you're close enough, and you press "i" your inventory will pop up and show you everything they have.

I made the shape in max, looks like a little diamond, made a new datablock in marker.cs, and edited MissionMarkerData::create() to include:

case "ShopMarker":
	%obj = new MissionMarker()
	{
		datablock = %block;
	};
	return(%obj);

When I place it in the editor everything works fine. But when I go back into my player view I can still see the marker.

How do I get it to only show the marker while in the editor? I'd like to do it the same way the editor hides the other markers.


Dark

#1
12/21/2001 (4:32 pm)
? Looked at the code for the mission marker class and it definitely should only be rendering when the mission editor is running. The SpawnSphere class is derived from MissionMarker and behaves that way as well. You sure your exiting the mission editor? Pressing f11? Just switching to the player view won't turn it off.
#2
12/21/2001 (6:00 pm)
No, I pressed f11 and the entire editor hud went away. I walked around and could still see it.

I looked at the code and you're right, it does look like it should be hidden. It's strange though because the SpawnSphere and WayPoint markers both get hidden, so I think I'm missing something in the scripts.

I'll lookat it later, right now I'm trying to fix my water error.


Dark