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 → MouseMines(tm)
MouseMines(tm)
2002-11-23, 4:39 PM #1
I need a cog written for me, and i really cant do it myself.

Heres the deal: I need a cog for a weapon which would be a mine that you would drop. This mine would be in the shape of a mousebot, and once you dropped the mine, the camera would show you the view from the mine, and you could drive it around like a radio controlled car, and then you could drive it up under someone, and detonate it. There should be a maximum range for driving it (2 JKU?). If you are killed while driving it around, it shoule become deactivated and be able to get picked up and used by someone else. If the mine is shot while you are driving it around, it should detonate.

Thank you in advance.

------------------
"I'm writing an autobiography."

"Oh! Of who?"
Stuff
2002-11-24, 5:39 AM #2
Please be MotS, please.
If JK, we're going to take a long talk. And you are going to do a lot of the work. But leave the cogging to me in both cases.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-24, 7:26 AM #3
JK/Mots? If JK i maybe can help you.
2002-11-24, 7:44 AM #4
I actully wrote a mouse controller for JK, and Im quite proud of it. But it already uses the only identifiable controllable player trait; if he is crouching. Here is the code if you want to build off of it.


In order for the mouse to work, youll have to strip off its AI...

Code:
# Mousie-vision.
#
# 11/2002 GBK
Symbols
Message Startup
Message Activated
Message Pulse
Message Timer
Message Damaged
Thing Player				Local
Thing Bot
Thing Cam				Local
Surface Switch
Flex Time
Flex Ac=1.5			#How fast?
Int StopFall=1		#Move in slow controlled fashion?
Int Fly=0			#Fly?
Sound Beep
Template G			#Ghost, prefferably.
Thing Gh=-1				Local
End
Code
Startup:
Sleep(0.5);
Player = JKgetlocalplayer();
Setwallcel(Switch, 0);
Capturething(Bot);
Stop;

Activated:
If(Getwallcel(Switch) != 0) Stop;
Setwallcel(Switch, 1);
Playsoundpos(Beep, Surfacecenter(Switch), 1, 0, 10, 0);
Cam = Createthingatpos(G, Getthingsector(Bot), Vectoradd(Getthingpos(Bot), '0 0 0.0001'), '0 0 0');
Attachthingtothingex(Cam, Bot, 0x8);
Setcamerafocus(0, Cam);
Setcamerafocus(1, Cam);
Setactorflags(Player, 0x40000);
Setpulse(0.01);
Settimerex(Time, 0, 0, 0);
Stop;

Pulse:
If(Getdebugmodeflags() == 0x400) Setpulse(0.0005); Else Setpulse(0.01);
If(!Getcurrentcamera()) Setthingcurgeomode(Bot, 0);
Else Setthingcurgeomode(Bot, 4);
Gh = Fireprojectile(Player, G, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0);
If(Gh == -1) { Print("Lookvector ghost creation failure."); Stop; } 
Setthinglook(Bot, Vectorset(Vectorx(Getthinglvec(Gh)), Vectory(Getthinglvec(Gh)), 0));
Setthinglook(Cam, Getthinglvec(Gh)); Destroything(Gh); Gh = -1;
If(Isthingcrouching(Player) == 1) {
If(!Fly) Setthingvel(Bot, Vectorscale(Vectorset(Vectorx(Getthinglvec(Bot)), Vectory(Getthinglvec(Bot)), 0), Ac));
Else Setthingvel(Bot, Vectorscale(Getthinglvec(Cam), Ac)); } 
Else If(StopFall) Stopthing(Bot);

Stop;

Timer:
Setpulse(0);
Setcamerafocus(0, Player); Setcamerafocus(1, Player);
Destroything(Cam); Setwallcel(Switch, 0); Setthingcurgeomode(Bot, 4);
Clearactorflags(Player, 0x40000);
Stop;

Damaged:
Setpulse(0);
Killtimerex(0);
Setcamerafocus(0, Player); Setcamerafocus(1, Player);
Destroything(Cam); Setwallcel(Switch, 0);
Clearactorflags(Player, 0x40000);
Stop;
End


Of course, that is reaching the limits of the ingame, non-mod object controllability in JK. MotS, however, with Playeraction, offers alot more control.


Oh, yeah, if your idea is for a mod, and not a level cog, then that opens up more options... [http://forums.massassi.net/html/tongue.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

GBK oNline. Cogs, tuts, and total w00tage.
And when the moment is right, I'm gonna fly a kite.
2002-11-24, 11:21 AM #5
GBK, if you use VectorX/Y(GetThingThrust(player)) in a pulse(0.01); and StopThing(player) after you get the thrust, it makes for pretty good controllable things.

Heck just thought of using TeleportThing to keep the player where he should be. [http://forums.massassi.net/html/wink.gif]

[This message has been edited by Hell Raiser (edited November 24, 2002).]
-Hell Raiser
2002-11-24, 1:57 PM #6
Thanks for replying, and this is going to be a mod, and I'm not sure if it is going to be JK or MoTS. Me and BV might be making a mod, but it was his idea*, so he gets to choose.

*The mousemines were my idea. The mod was his.

------------------
"I'm writing an autobiography."

"Oh! Of who?"
Stuff
2002-11-24, 3:37 PM #7
Being that I don't own MotS...
That painting was a gift, Todd. I'm taking it with me.
2002-11-24, 4:14 PM #8
Well dont let that stop you!!
And when the moment is right, I'm gonna fly a kite.
2002-11-24, 5:39 PM #9
Nice cog GBK. Sweet idea.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-25, 8:39 AM #10
well, cog is nice but, how to fix "Lookvector ghost creation failure." err?
2002-11-25, 8:45 AM #11
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Descent_pilot:
Nice cog GBK. Sweet idea.
</font>


Is that a *gasp* compliment? [http://forums.massassi.net/html/tongue.gif]
And when the moment is right, I'm gonna fly a kite.
2002-11-25, 9:30 AM #12
*gasps lounder then GBK* hey your right
That wasn't not entirely my intent. [http://forums.massassi.net/html/tongue.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!