Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
question about programming tanks.. #305942
01/18/10 16:19
01/18/10 16:19
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
Hi!

right now i am working on a tank, and i got 2 questions:

my first question: how do i make my turret on the tank, not to collide with the tank? because my tank can't move, when i put the turret close to the tankbody, but if i take it away from the tankbody, then my tank, can move again.

my second question: when i move my tank up a mountain or something else, then it moves like this:

http://img121.imageshack.us/img121/5249/tankpic1.jpg


how do i make it move up like this?:

http://img64.imageshack.us/img64/2834/tankpic2.jpg


thanks for the helps, i really need them!


- Muhsin Kaymak

Last edited by Muhsin; 01/18/10 16:21.

Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: question about programming tanks.. [Re: Muhsin] #305946
01/18/10 16:35
01/18/10 16:35
Joined: Apr 2009
Posts: 274
atari98 Offline
Member
atari98  Offline
Member

Joined: Apr 2009
Posts: 274
Lool in the Menue: "Proberties" in WED by your Model.


Meine Fun Websiten
www.free4-fun.de.tl

www.gamer-liga-live.de.tl

Meine Game-Projekt Websiten
www.gamer-projects.de.tl
Re: question about programming tanks.. [Re: Muhsin] #305947
01/18/10 16:36
01/18/10 16:36
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
To your first question: Have you tried making the turret passable? set(my, PASSABLE). An alternative is to set both their "group" variables to the same nonzero number. Look up "group" in the manual. You'll need to use "IGNORE_PUSH" in your collision functions.

To your second question:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=291799#Post291799
Hopefully you find that helpful laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: question about programming tanks.. [Re: JibbSmart] #305961
01/18/10 17:36
01/18/10 17:36
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
can you please write an example for the first question, i can't make it work with the group thing?

thanks!

- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: question about programming tanks.. [Re: Muhsin] #305969
01/18/10 18:26
01/18/10 18:26
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
okay i solved my first problem, thank you very much for the help!
now i will try solve my second problem.

thanks!

- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: question about programming tanks.. [Re: Muhsin] #306046
01/19/10 09:52
01/19/10 09:52
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Do a trace downwards from the tank, and set it's rotation to the target rotation using vec_to_angle.
If you need any help on that, let me know, i can whip up a piece of code for you laugh

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: question about programming tanks.. [Re: Helghast] #306099
01/19/10 18:36
01/19/10 18:36
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
that would be great if you could write me an example for that! thank you!


- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: question about programming tanks.. [Re: Muhsin] #306227
01/20/10 16:00
01/20/10 16:00
Joined: May 2009
Posts: 137
Ohio, U.S.A.
PigHunter Offline
Member
PigHunter  Offline
Member

Joined: May 2009
Posts: 137
Ohio, U.S.A.
second question answer: Courtesy of George's answer to a question in AUM 36, slightly modified to work in Lite-C.

action tank()
{
ANGLE temp;

while(1)
{
temp.tilt = 0;
temp.roll = 0;
temp.pan = -my.pan;
vec_rotate(normal, temp);
temp.tilt = -asinv(normal.x);
temp.roll = -asinv(normal.y);
my.tilt += 0.1 * ang(temp.tilt - my.tilt); // play with 0.1
my.roll += 0.1 * ang(temp.roll - my.roll); // play with 0.1
wait(1);
}
}

Re: question about programming tanks.. [Re: PigHunter] #306238
01/20/10 16:43
01/20/10 16:43
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
OK, thank you it works!, but know i got 2 other questions:

when i stop in the middle of the "mountain", then the tank returns to its old "way" like in picture 1. how do i solve this problem?

and how do i make the tank's turret and cannon to act the same way as the tankbody?

thanks!

- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: question about programming tanks.. [Re: Muhsin] #306240
01/20/10 17:04
01/20/10 17:04
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Could you post your tank movement code, that helps us in solving the rotation issues laugh

tanks,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1