2 registered members (AndrewAMD, Ayumi),
838
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Third Person Shooter, questions
#227713
09/15/08 20:40
09/15/08 20:40
|
Joined: Sep 2008
Posts: 68
Tai
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2008
Posts: 68
|
I have been trying for a while to find an actual third person camera/movement code, IE; following the mouse with the look, and moving with WASD keys. Does anyone have any sort of suggestions on how this could be done,(With Lite-C) or an actual code?
Oh yes, one other thing, does anyone know how to convert the minimap from AUM to Lite-C, or could you get a script to do the same thing?
-Thanks, Tai
EDIT: One more quick thing, how would you add a crosshair to a script, because I have been unable to find such.
Last edited by Tai; 09/15/08 20:41. Reason: additions
|
|
|
Re: Third Person Shooter, questions
[Re: Tai]
#227723
09/15/08 21:21
09/15/08 21:21
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
Senior Member
|
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
Here something that will give you a start.
action my_player()
{
player = my; // I'm the player
set (my, INVISIBLE); // no need to see player's model in 1st person mode
while (1)
{
// move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed
c_move (my, vector(20 * (key_w - key_s) * time_step, 6 * (key_a - key_d) * time_step, 0), nullvector, GLIDE);
if (mouse_left) // if the player presses the left mouse button
{
fire_bullets(); // call this function
}
vec_set (camera.x, player.x); // use player's x and y for the camera as well
camera.z += 30; // place the camera 30 quants above the player on the z axis (approximate eye level)
camera.pan -= 5 * mouse_force.x * time_step; // rotate the camera around by moving the mouse
camera.tilt += 3 * mouse_force.y * time_step; // on its x and y axis
player.pan = camera.pan; // the camera and the player have the same pan angle
wait (1);
}
}
renny
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: Third Person Shooter, questions
[Re: Tai]
#227729
09/15/08 21:39
09/15/08 21:39
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
Serious User
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
|
In lite-c contributions there is kingdom of hearts. What minimap are you talking about. Look on the AUM site or wiki for crosshair
Windows XP SP3 Intel Dual Core CPU: E5200 @ 2.5GHz 4.00GB DDR3 Ram ASUS P5G41T-M LX PCIE x16 GeForce GTS 450 1Gb SB Audigy 4 Spyware Doctor with AntiVirus
|
|
|
Re: Third Person Shooter, questions
[Re: Tai]
#227782
09/16/08 05:25
09/16/08 05:25
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
Serious User
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
|
What do you mean by attach - doesn't attach the action or doesn't attach the camera.. Please be more specific.. try this minimap for lite-c - untested
//minimap from aum 27
VIEW* top_view
{
layer = 15;
pos_x = 0; // appears in the upper left corner of the screen
pos_y = 0;
size_x = 200;
size_y = 150;
tilt = -90;
arc = 80; // zoom factor
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
init_topcam_startup()
{
while (player == null) {wait (1);}
while (1)
{
if (key_t == 1)
{
while(key_t == 1) {wait(1);}
if is(top_view,VISIBLE)
{
reset(top_view,VISIBLE);
}
else
{
set(top_view,VISIBLE);
}
}
top_view.x = player.x;
top_view.y = player.y;
top_view.z = 1000; // play with this value
wait (1);
}
}
If you have any other problems do the tutorials read the manual and have a look at resources, wiki, aum etc.. Good luck..
Windows XP SP3 Intel Dual Core CPU: E5200 @ 2.5GHz 4.00GB DDR3 Ram ASUS P5G41T-M LX PCIE x16 GeForce GTS 450 1Gb SB Audigy 4 Spyware Doctor with AntiVirus
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|