|
Re: 2d games
[Re: Panda_Dude]
#366724
04/06/11 19:43
04/06/11 19:43
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
What is that code supposed to do, despite of loading a level and setting a camera position?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: 2d games
[Re: Panda_Dude]
#366728
04/06/11 20:01
04/06/11 20:01
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Ah, ok. If you assigned player_move() to an entity this should more or less work. What is the part that is not working as your expect it?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: 2d games
[Re: Uhrwerk]
#366729
04/06/11 20:03
04/06/11 20:03
|
Joined: Mar 2010
Posts: 56 Hertfordshire, England
Panda_Dude
OP
Junior Member
|
OP
Junior Member
Joined: Mar 2010
Posts: 56
Hertfordshire, England
|
well it won't even run the script... I don't know what's wrong. I made some alterations to the script
action player_move ()
{
player = me;
while (1)
{
set (my,POLYGON)
camera.pan = player.pan;
player.pan = (key_cur-key_cul) * 10 * time_step;
movement = (key_cuu-key_cud) * 10 * time_step;
c_move (player, vector(0,movement,0),nullvector, GLIDE);
wait (1);
}
}
I did this because otherwise the 'player' would only be able to move on one axis (I think)
Last edited by Panda_Dude; 04/06/11 20:08.
|
|
|
Re: 2d games
[Re: Redeemer]
#366731
04/06/11 20:20
04/06/11 20:20
|
Joined: Mar 2010
Posts: 56 Hertfordshire, England
Panda_Dude
OP
Junior Member
|
OP
Junior Member
Joined: Mar 2010
Posts: 56
Hertfordshire, England
|
oh yeah... I forgot about that. But still it says "Error with SCRIPT.C Startup failure" Wait no it is about the player = me; bit. It says cannot convert 'POINTER' to 'struct ENTITY'
Last edited by Panda_Dude; 04/06/11 20:28.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|