Re: Trap Templates?


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]

Posted by Vizzini on April 24, 1998 at 22:03:38:

In Reply to: Re: Trap Templates? posted by Vizzini on April 24, 1998 at 19:47:44:


Okay, I'm getting impatient, so I decided to make my own 3do. I found out how incerdibly easy it was- all I had to do was make a sector, texture it, save it as a 3do, and edit the master.tpl. Anyway, I made kind of a boulder (which I'll refine later) that will explode on impact (they will be dropped from great heights).
BTW, after looking through the master.tpl file, which stores all the 3do files, I understand a lot more about 3dos. I think that an object obeys the laws of physics (somewhat loosely) if you make it throwable, which you can do by going into master.tpl and changing your 3do from _walkstruct to _throwable.
Any help would still be appreciated.
:
: Here is the exact cog I'm using:

:
: symbols

: surface switch desc=switch

: template proj_tpl=+seqchrg
: thing tdg1 nolink,desc=tdg1
: thing tdg2 nolink,desc=tdg2
: thing tdg3 nolink,desc=tdg3
: thing tdg4 nolink,desc=tdg4

: int rounds=2 desc=rounds

: flex rate=0.1 desc=rate
: flex delay=3.0 desc=delay

: int firing=0 local
: int cur_round=0 local
: int dummy local

: sound on_snd=set_hi2.wav local
: sound off_snd=lgclick1.wav local

: message activated

: end

: # ========================================================================================

: code

: activated:
: if(firing == 1) Return;

: firing = 1;
: dummy = SetWallCel(switch, 1);
: dummy = PlaySoundPos(on_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
:

: cur_round = 0;
: while(cur_round < rounds)
: {
: dummy = CreateThing(proj_tpl, tdg1);
: Sleep(rate);
: dummy = CreateThing(proj_tpl, tdg2);
: Sleep(rate);
: dummy = CreateThing(proj_tpl, tdg3);
: Sleep(rate);
: dummy = CreateThing(proj_tpl, tdg4);
: Sleep(rate);

: cur_round = cur_round + 1;
: }

: Sleep(delay);
: dummy = SetWallCel(switch, 0);
: dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
: firing = 0;
: Return;

: end

: It already uses the CreateThing command, although the stuff inside the parentheses is different. The symbols are different too though, and changing them doesn't seem to work. I don't understand why this cog doesn't work for barrels, since it just creates four things.

: : Most traps use the FireProjectile command
: : (like the one I used in my tutorial for instance)...
: : try changing this to CreateThing(projectile, thingPos) if
: : you're trying to drop crates, where projectile is of course the
: : crates, and thingPos is the position of where to drop it from.

: : if you need more help with this, ICQ me.. my UIN is 1496113




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]