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 → template difference
template difference
2002-03-09, 1:05 AM #1
The following cog works if the mutator template is set to crossbow. But if I change it to crate6_2, nothing appears...

Code:
symbols

template	mutator=crossbow	local
template	wpl=walkplayer		local

thing		mutatoron		local

thing		mutator0		local
thing		mutator1		local
thing		mutator2		local
thing		mutator3		local
thing		mutator4		local
thing		mutator5		local
thing		mutator6		local
thing		mutator7		local
thing		mutator8		local
thing		mutator9		local

model		off=mutator0.3do	local
model		on=mutator1.3do		local

int		thingcount		local
int		nummutators		local
int		random			local
int		firsttime		local

message		loading
message		timer
message		pulse

end

# ========================================================================================

code

loading:
	if(!IsServer()) Return;
	firsttime = 1;
	nummutators = 0;
	SetTimerEx(5, 111, -1, -1);
	Return;

timer:
	// Initialization
	if(GetSenderId() == 111)
	{
	 thingcount = GetThingCount();
	 for(i = 0; i < thingcount; i = i + 1)
	 {
	  if((GetThingTemplate(i) == wpl) && (nummutators < 10))
	  {
	   mutator0[nummutators] = CreateThing(mutator, i);
	   nummutators = nummutators + 1;
	  }
	 }
	}
	SetPulse(10);

	Return;

pulse:
	//if only one player return
	jkStringClear();
	jkStringConcatAsciiString("Random Mutation");
	jkStringOutput(-3, -1);
	if(firsttime == 1)
	{
	 firsttime = 0;
	}
	else
	{
	 SetThingModel(mutatoron, off);
	}

	random = Rand() * nummutators;
	mutatoron = mutator0[random];
	SetThingModel(mutatoron, on);

	Return;	
end
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-03-09, 2:58 AM #2
Are you sure the template crate6_2 is in the level you are testing?
- Wisdom is 99% experience, 1% knowledge. -
2002-03-09, 3:23 AM #3
hmmm...can't you use default jk templates in every level? What if I put it in static.jkl?
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

↑ Up to the top!