to magnetos:
we´re making a nice checkhit set /doesn´t use hittest at all),i can send it to you if you want it.
Printable View
to magnetos:
we´re making a nice checkhit set /doesn´t use hittest at all),i can send it to you if you want it.
thanks tommason i already mail you just in case you lost my email :D
another question
see in my so called game when the tank shoot the bulding i would like to change the bullet angle
what i mean is how do i go about hiting the first floor and sometimes the last? or even go over the building?
should i divide the bulding in 3 separate mcs?
but how do i change the angle of the turret?
cia:D
i answered your mail,check your box for that.Quote:
Originally posted by magnetos
thanks tommason i already mail you just in case you lost my email :D
another question
see in my so called game when the tank shoot the bulding i would like to change the bullet angle
what i mean is how do i go about hiting the first floor and sometimes the last? or even go over the building?
should i divide the bulding in 3 separate mcs?
but how do i change the angle of the turret?
cia:D
bullet angle is a bit more complicated when you want it to be realistic.you could go for the simple solution,add the code to move the turret up/down on keypress and add code to the bulletfire codelines which make the bullets become bigger (fly higher when the turret is on high position) and then display a different hit picture on the buildings depending on how high the bullet was in the moment of hit (=the size of the bullet on hit).
For the realistic way,you´ll have to add a turretheight value too.Then you set up an angle code which is influenced by that value and which let´s the bullets fly in the right direction.then you can apply the checkhit function i mailed you for the bullet and house mcs too and let the hits be displayed where the bullet hit the building.
Tell me which one you prefer so i can work on the code.
i was thinking
when an anemy or a target is close enough a red cross arrow appears when the cross is locked on target it changes color and then you press space bar to shoot it down
you can also shoot before its locked in ..
depending on the height of the target we scale the bullet accordingly giving the illusion of depth
the cross (i know there is another name for it but for peter'sake i cant remember:D)
i was saying the cross should appear only when a target is near and if there are more the 1 target it should go on the nearest or the most dangerous
what do you think?
sounds good to me.
Give all objects a cost in danger, or power. Then have the auto aim add the danger cost and subtract the distance cost. Least gets targetted.
Also, even when somthing is targetted, make the player get into around about the rightr distance away for it to land on the target.
Hitting buildings: each hit knocks off a floor, each floor could be a MC.
any idea how i go about creating the auto aim ?
hey ... i was playing around with your game
and i found a problem
when u go near the building
and u keep pressing space or control u go through it ..
-------------------------------------------------------
-------------------------------------------------------
this is my game
http://board.flashkit.com/board/show...hreadid=278111
hey djzombie your link doesnt work!!
but i managed to download your game using the mouse left botton and then i saved as target
what are you trying to do? is that supposed to be a scrolling platformer game????
ps my game is not a game yet i am just testing some ideas!!
so there are still plenty of bugs
cia:D
I think you have to copy/paste so it doesn't get a non yahoo referrer
hey tommason do you have any idea how i can make the chopper spin around the tank ?
see in the code you gave me if the chopper gets to close stops
now i want it to spin around the tank instead
i know this involves trig but i suck at math always have :-{
thanks for you help
cia:D
magnetos r u still looking for auto aim ???
sure dj zombie !!
any hints ideas?
Thanks, tomsamson! Great ideas!Quote:
Originally posted by tomsamson
To dumb down the ai, ...
to totalmonkey:
no problem,tell me if you have problems with realising one of them or want to show your progress.(i coded all mentioned ones for our current project)
to magnetos:
sorry for not answering on your post but i´ve been out yesterday.did dj zombie send you something or do you still need help?
I´ll check back in one or two hours,so feel free to ask
up to then,
tomsamson
I finished tweaking my game engine (without AI) this weekend,Quote:
Originally posted by tomsamson
to totalmonkey:
no problem,tell me if you have problems with realising
one of them or want to show your progress.(i coded all
mentioned ones for our current project)
so I'll be starting work on the npc AI this week, then hit
checking.
I'm trying to put my emphasis on fast, fluid
routines for a smooth game engine that runs on somewhat
slower machines. Apparently, I'm being somewhat successful:
this morning on my slow office computer (150MHz, 64MB RAM)
I tried out the graphics optimizations I worked on this
weekend, and it ran "nearly" as fast as my home computer
(650MHz, 800+MB RAM). I must be doing something right! :)
Once I get to where I feel comfortable with how the engine
and graphics look, I'll post a sample. I'll let you know if
I have any problems with the AI stuff, tomsamson. Thanks
again!
[Edited by TotalMonkey on 03-11-2002 at 04:52 PM]
nope djzombie just ask a question that's it!
i still need to make the chopper spin around the tank when it stops followng
thanks again tommason !!
:D ciao
hm,it looks like i´m out when you´re in and the other way round.
Anyway,magnetos,why don´t you use a simple solution:
go inside the helimc and drag the graphic
a bit right from the mcs center.Then add _path.helimcname._rotation += 10; to the code for the heli following i mentioned before.
It is hard to say without seeing the code, but heres how it would go.
Define an origin point in the helicopter MC. This can either be coded in, or an MC. Have a function make this origin follow the tank, with easing. Also have it keep varibles of how far away it is from its target (probably neccessary for its workings anyway). Have the helicopter clip have an angle variable, and a speed variable, along with an offset variable.
Somthing like this:
[load]
angle = 0;
speed = 5;
offset = 20;
rad_conv = Math.PI/180;
[enterFrame]
target = _root.targetMC; // Or, this could be na object holding the target data, and takes the place of the MC
if(Math.abs(target.xdist) < 30 && Math.abs(target.ydist < 30)){
angle += speed;
}
_x = (Math.sin(angle*rad_conv)*offset)+target._x; // Change approp.
_y = (Math.cos(angle*rad_conv)*offset)+target._y;
thanks ed here is the code
yes tom i live in ny (not the bronx sheeshh)
if i remember correctly you are in the netherlands right?
i believe we are like 8 or 9 hours apart
well i try your easy fix
i actually made a function out of it
function followTank () {
newx = _root.tank._x+65;
newy = _root.tank._y-40;
distx = int(getProperty(this, _x)-newx);
disty = int(getProperty(this, _y)-newy);
z = (distx*distx)+(disty*disty);
hyp = Math.sqrt(z);
speed = 2;
// change speed for faster npc movement
distance = int(hyp/speed);
movex = distx/distance;
movey = disty/distance;
if (distance<=0) {
_rotation+=speed;
// exchange npcmoves with target of your npc moving animation
} else {
setProperty (this, _x, getProperty(this, _x)-movex);
setProperty (this, _y, getProperty(this, _y)-movey);
distance = distance-1;
}
}
as you see i added these lines and moved the chopper little off to the right
if (distance<=0) {
_rotation+=speed;
it a cool idea but it doesnt work
for some reason it stops and that's it!!
any idea why?
cia:D