Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Show BM on screen
Show BM on screen
2003-07-01, 10:12 AM #1
Hi!
I think this is a COG question.
How do I get a BM to show on the screen when ever I want? Like, I make a level where you can pick up force stars on the way, and they show on the screen.

/Edward
Edward's Cognative Hazards
2003-07-01, 10:27 AM #2
I only wish that were possible... [http://forums.massassi.net/html/frown.gif]

You can create a bm that shows up when you pick something up, then disappears. It'll appear in the upper-right corner, like when the field light is activated. The cog command is:
ActivateBin(player, flex delay, bin#);
and to turn it off:
DeactivateBin(player, bin);

This is usually used for inventory items, so there's a chance it won't work if it's not in your inventory. And for troubleshooting: jk probably won't look for the bm until the cog executes the actviateBin command, but I'm not sure.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-07-01, 10:29 AM #3
You *might* even be able to change the position using offset values in the bm. You'll more than likely have a negative values, the x for sure. If you want to move it down, y will be negative, but you know how that works.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-07-01, 10:41 AM #4
It did not work! Well, I wasn't quite true on what I wanted to do in this level.
At start, I wanted to show the player what force powers he had by quickly showing the force icons.
Code:
#Level master COG
#Generated by JED 0.95 beta

symbols
message   startup
int       player    local
end

code

startup:
  sleep(1);
  // Register COG as master COG
  SetMasterCOG(GetSelfCOG());
  player = GetLocalPlayerThing();
  // Initialise Goals
  SetInv(player, 99, 5000);
  SetGoalFlags(player, 0, 1);
  SetGoalFlags(player, 1, 0);
  // Give player weapons and ammo
  SetInv(player, 1, 1);   // fists
  SetInv(player, 2, 0);   // briar
  SetInv(player, 3, 0);   // ST Rifle
  SetInv(player, 4, 0);   // TD
  SetInv(player, 5, 0);   // Crossbow
  SetInv(player, 6, 0);   // Repeater
  SetInv(player, 7, 0);   // Railgun
  SetInv(player, 8, 0);   // Sequencer charges
  SetInv(player, 9, 0);   // Concussion Rifle
  SetInv(player, 10, 0);   // Lightsaber
  SetInv(player, 11, 0);   // Energy
  SetInv(player, 12, 0);   // Power
  SetInv(player, 15, 0);   // Railcharges
  // Initialize weapon.
  SetFireWait(player, -1);
  SetMountWait(player, 0);
  SetCurInvWeapon(player, 0);
  SelectWeapon(player, AutoSelectWeapon(player, 1));
  sleep(1);
  SetGoalFlags(player, 0, 2);
  SetGoalFlags(player, 1, 1);

  // Force ranking
  SetInv(player, 20, 8);
  SetInv(player, 14, 300);
  SetInv(player, 21, 4.0);
  SetInv(player, 22, 4.0);
  SetInv(player, 24, 4.0);
  SetInvAvailable(player, 21, 1);
  SetInvAvailable(player, 22, 1);
  SetInvAvailable(player, 24, 1);
  ActivateBin(player, 1, 21);
  ActivateBin(player, 1, 22);
  ActivateBin(player, 1, 24);
  sleep(1);
  DeactivateBin(player, 21);
  DeactivateBin(player, 22);
  DeactivateBin(player, 24);
  jkSyncForcePowers();
  Return;

end

I baked it in the StartUp COG.
Help, please!

/Edward
Edward's Cognative Hazards
2003-07-01, 1:03 PM #5
Quote:
<font face="Verdana, Arial" size="2"> And for troubleshooting: jk probably won't look for the bm until the cog executes the actviateBin command, but I'm not sure.</font>


JK checks for all .bm files (the 8 or 16-bit version depending on settings) that the items.dat needs when a level is loaded.

Your problem is with ActivateBin(). This verb is for firing force powers, it does not literally activate a bin. Yeah, it's badly named. Same for DeactivateBin().

It should be like this:
Code:
	SetInv(player, 21, 4);
	SetInv(player, 22, 4);
	SetInv(player, 24, 4);
	SetInvAvailable(player, 21, 1);
	SetInvAvailable(player, 22, 1);
	SetInvAvailable(player, 24, 1);
	SetInvActivated(player, 21, 1);
	SetInvActivated(player, 22, 1);
	SetInvActivated(player, 24, 1);
	Sleep(3);
	SetInvActivated(player, 21, 0);
	SetInvActivated(player, 22, 0);
	SetInvActivated(player, 24, 0);




------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-07-01, 11:14 PM #6
OK! It worked! Thanks!
I wonder... Is there something in one of the dat or uni files that has like "force jump = icf_jum8.bm / icf_jum16.bm = offset X,Y"?

/Edward
Edward's Cognative Hazards
2003-07-02, 3:44 AM #7
Nope, jk uses the first five letters of the bin name to generate an icon name.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!