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 → Post one problem, another accurs...
Post one problem, another accurs...
2004-04-09, 4:17 AM #1
Code:
# Eggshells fall
#
# By Edward
symbols

message		startup
message		entered
message		pulse

surface		floor

sound		fall

sector		room

message		fallingeggs

thing		theegg0
thing		theegg1
thing		theegg2
thing		theegg3
thing		theegg4
thing		theegg5
thing		theegg6
thing		theegg7
thing		theegg8
thing		theegg9
thing		theegg10
thing		theegg11
thing		theegg12
thing		theegg13
thing		theegg14
thing		theegg15
thing		theegg16
thing		theegg17
thing		theegg18
thing		theegg19
thing		theegg20
thing		theegg21
thing		theegg22
thing		theegg23
thing		theegg24
thing		theegg25
thing		theegg26
thing		theegg27
thing		theegg28
thing		theegg29
thing		theegg30
thing		theegg31
thing		theegg32
thing		theegg33

message		touched

int		i=0		local

int		x=0		local

end
#
code
startup:
	SetPulse(1);
return;
entered:
	if(GetSenderRef()!=floor) return;
	i=1;
	call fallingeggs;
return;
pulse:
	if(GetSectorPlayerCount(room)==0)
	{
		i=0;
		for(x=0; x<34; x=x+1)
		{
			MoveToFrame(theegg0[x],0,100);
		}
	}
return;
fallingeggs:
	while(i==1)
	{
		x=rand()*33;
		if(GetCurFrame(theegg0[x])==0)
		{
			MoveToFrame(theegg0[x],1,3);
			PlaySoundThing(fall,theegg,1,-1,10,0x80);
			WaitForStop(theegg0[x]);
		}
		sleep(0.1);
	}
return;
touched:
	for(x=0; x<34; x=x+1)
	{
		If(GetSenderRef()==theegg0[x])
			DamageThing(GetSourceRef(),1000,0x1,GetSourceRef());
	}
return;
end

OK, the problem is this. When theeggs fall, they should give a sound. But it is wierd:
I have done a corner camera effect, and when I'm looking in through that, I don't hear them fall, unless I make a noise, then they all make sounds all at once. When I use my own view, they make a sound, all of them. Even when they've reached frame 1. It sure is wierd...
Edward's Cognative Hazards
2004-04-10, 6:26 AM #2
Maybe the camera can't hear the sounds (too far away or something)?
I dunno.

------------------
Bond, Power, CA, The Force, Saber, IC, Epic, Oily Mexican Food, BG, /\ |> /\ /\/\, Sentences.
Now you know where I've been.
May the mass times acceleration be with you.
2004-04-10, 6:32 AM #3
Well, I don't think so... The room is only 14x14m big. Hm... But then, what about the sound playing more than once every time a theegg drops? And why play when ,,,...never mind about the sound... I think I've figured it out. Why the repeating, cause I never tested to see if there were 33 theeggs. And as for the vol, maybe... 20? Yeah, that did it... OK, sorry for cluttering up the COG forum... *walks away so quietly, that you'd think he was floating...*

/Edward


[This message has been edited by Edward (edited April 10, 2004).]
Edward's Cognative Hazards

↑ Up to the top!