Re: Yeehaw!!!!-STEALTH..read :D


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Stealth on February 23, 1998 at 15:37:03:

In Reply to: Yeehaw!!!!-STEALTH..read :D posted by Elanthil01 on February 23, 1998 at 09:23:01:

> YESS!!!

> The cogs are all working in their base forms hehe!

> I wrote some hideously huge cogs that you have to modify for every object you use them on (adding/subtracting moveframes depending on the total frames to use), FORTUNATELY, Stealth has made a cog that will (hopefully) free us from all that!

> Stealth..the cog you posted for me seems to work well...do yourself a favor..

> Edit the cog, put in all the legal info to protect you from LucasArts, and put in your info stating you built it :D

> Then post that sucker to the file section!!

It was just something i thought up quickly. It could have been made a bit better.


> I *DO* have one other ? about cogs.

> I have an autoelev.cog that I use to run a non-elevator object through frames as if its an elevator.

> It works very well with one minor problem.

>
> The script itself is a bastardized version of carpet.cog from Cardia2.gob.

> The author set the cog up to play a sound when you enter the object and while it moves.

> Unfortunately for some reason the sound wont play.

> Heres the line (with explanations)..and yes..the symbols for the sound are set :D

> FROM THE END OF THE SYMBOLS SECTION:

> int dummy local
> sound fly_snd=00wind02.wav local
> end

> FROM THE MOVEFRAME SECTION OF THE CODE:

>
> Sleep(start_wait); // pause before moving up
> dummy = playsoundthing(fly_snd,elevator,7.0,-.5,.5,0x0);

try it like this
playsoundthing(fly_snd,elevator,1.0,-1,-1,0);

The 7.0 is Too big max volume is "1.0"

> MoveToFrame(elevator, 1, speed);

>
> BREAKDOWN OF MOVEFRAME SECTION IN CARPET.COG:

> Sleep (start_wait);
> This pauses the duration set in this variable before performing the next action

> dummy = playsoundthing(fly_snd,elevator,7.0,-.5,.5,0x0);
> Not sure why he has 'dummy', but this should play the sound defined as 'fly_snd)in symbols, on the object (elevator), volume 7, -.5 distance 'X' coordinates, .5 distance 'Y' coordinates, and with the flag of 0x0 (whatever that is).

It returns 1 if i remember right if the sound played.


> The other option would be to edit JED's master.tpl and add a second copy of the item (i.e. a second landpad, and call it landpad.2) and define the sndclass for it.

No problem.. put it right below the other one. or at the end. As long as you make sure any templates called are created in the tpl first it can go anyplace after that.


> When you add the thing to the .tpl, theres a #desc line, a #rad line, a line to define the thing itself (3do, texture, mass, radius, etc), then a line to define the sndclass.

You can ignore those , we added those for Jed,
The # Rad is to describe the radius size if its an object used in the level ,was used to show how big of a red circle to make.
The # Desc is a description that shows up in the res picker if it`s there.

You don`t have to add those. or you can add them if you want.

> Unfortunately, the line with sndclass in it winds up being listed as a separate 'thing' in the .tpl hierarchy for some reason, rather than as part of the 'thing' its supposed to be on.

You should be able to add the sndclass to the thing it`sself in the thing editor, that will override the class snd.

> Also..I dont recommend going this route anyway as the .tpl is very touchy and I have no idea where in the file its safe to put this, other than it HAS to be somewhere in the section that the first 'thing' is.

The order they go in.. every thing you use(templates ) must be declared before you use them. the final template can be any place after that.


name1 none type=physics etc etc
name2 name1 sndclass=1.snd etc
name2a none type=explosion
name3 name 2 creatething=name2a sndclass=2.snd

Anything declared after the parent is overridden or added to in the child templates (templates with type= are considered a parent) the childs are anything based off the parent.The childs have all of the properties of it`s parent(s)





Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]