Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Missile code?
Old
Killerzeron
Member
 
Status: Offline
Posts: 19
Join Date: Dec 2014
Location: Mumbai
Default Missile code? - 01-05-2015, 11:05 PM

EDIT: Now i made up a missile code...but for now, i got a new doubt. It's below on my plans.

now i know that i need a list if i want my missile to hit the tgt.


Plans:

1) Now what i am gonna do is add a circle , which will act as a range. all missiles will be like a homing missile (just making it a easy flight sim version) so you dont have to wait for a lock on and launch the missile. Now what i need is....the confusion with my if/else. Suppose that i put in all my missiles as a list, so if any of the world's object are in this missile, then the missile can turn and hit the object that was in it's circle. I am confused, i tried using the if () is within () of object then....
Does anyone know how to do this?? i am just so confused....


2) help on this:

i just need some help actually, on the speed one, not using the spacebar for speed, but using the ctrl to move at a constant speed, so what i need help at is that i just want that when i hit the ctrl button the plane moves at the constant speed,but when i hit it again it stops moving.

3)

Last edited by Killerzeron; 01-15-2015 at 09:07 PM.
   
Reply With Quote
Model
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 407
Join Date: Oct 2013
Location: Northern Virginia
Default Model - 01-06-2015, 11:02 AM

Could you give me the model your working with?

I'm sure I could help you out with it.


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Old
Killerzeron
Member
 
Status: Offline
Posts: 19
Join Date: Dec 2014
Location: Mumbai
Default 01-06-2015, 09:50 PM

Quote:
Originally Posted by RavenOfCode View Post
Could you give me the model your working with?

I'm sure I could help you out with it.
hello raven,

Model: MiG-29 (object pack one from here on the forums...)

i firstly apologize that i didnt say what i was working on. what i am currently doing is a flight simulator. while i just get bored so i thought of making a small mini game... which i usually play on my laptop whenever bored at home.

So do you know how to make a missile go behind u? like how real missiles work?

thanks,

i will upload the files later since i am a bit busy now...my apologies.
   
Reply With Quote
Here you go
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 407
Join Date: Oct 2013
Location: Northern Virginia
Default Here you go - 01-07-2015, 03:32 PM

Here is some code on what I think you needed, if you need more or didn't like this I would be glad to do another for you, and I would make it more realistic. Also if you do need more posting a link to a video of what you want would be helpful

Hope this helps,
RavenOfCode
Attached Files
File Type: a2w Missle TEST.a2w (1.17 MB, 9 views)


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Old
Killerzeron
Member
 
Status: Offline
Posts: 19
Join Date: Dec 2014
Location: Mumbai
Default 01-07-2015, 09:08 PM

hi there raven,

your code was awesome and i loved it. however if i waant the other missiles to work like that, should i just change the object and pase the code so the other missiles will work like the same in the MiG??

thanks,

Zeron

Last edited by Killerzeron; 01-07-2015 at 09:26 PM. Reason: few doubts added
   
Reply With Quote
Yep
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 407
Join Date: Oct 2013
Location: Northern Virginia
Default Yep - 01-07-2015, 09:12 PM

Yes you will need to add other objects and copy/paste the code (via click boards) into another method. And you will need to 'make' the missile aka copy the missileSmoke object and put it behind a new missle.
Best of luck with your game I hope to try it out.


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Old
Killerzeron
Member
 
Status: Offline
Posts: 19
Join Date: Dec 2014
Location: Mumbai
Default 01-07-2015, 10:23 PM

Quote:
Originally Posted by RavenOfCode View Post
Yes you will need to add other objects and copy/paste the code (via click boards) into another method. And you will need to 'make' the missile aka copy the missileSmoke object and put it behind a new missle.
Best of luck with your game I hope to try it out.
can u do the codes for all my missiles if u can? i couldnt understand the codes and explanation, im not that advanced at dummy and those things xD
   
Reply With Quote
Old
Killerzeron
Member
 
Status: Offline
Posts: 19
Join Date: Dec 2014
Location: Mumbai
Default 01-07-2015, 11:31 PM

Quote:
Originally Posted by RavenOfCode View Post
Yes you will need to add other objects and copy/paste the code (via click boards) into another method. And you will need to 'make' the missile aka copy the missileSmoke object and put it behind a new missle.
Best of luck with your game I hope to try it out.
can u elaborate clearly step by step?

like

first separate the missile from the jet but set the vehicle to the jet,
then just ...
and then...


can u explain like that? After every step kindly add up a , so i can understand better

thanks in advance raven.
   
Reply With Quote
Sorry I should have been more clear
Old
RavenOfCode
Senior Member
 
RavenOfCode's Avatar
 
Status: Offline
Posts: 407
Join Date: Oct 2013
Location: Northern Virginia
Default Sorry I should have been more clear - 01-08-2015, 08:38 AM

So what I did was remake the world with missiles that hold the firing code in them. So all you have to do is:
1. Make a copy of the missile
2. Make a copy of the missiles smoke
3. Before shooting the missile play the setupSmoke method (I suggest when world starts play the setup method on the missile using the smoke)
4. When you shoot the missile it can be used on any plane/thing, there are alot of parameters that will pop up and ask you what to use, I think they are self explanitory, whatPlane is the plane your using, missileSmoke is the missiles smoke, dropDistance is the distance it will get dropped, ect.

Hope this helps,
RavenOfCode
Attached Files
File Type: a2w Working Missle.a2w (1.27 MB, 3 views)


Stuff + Other Stuff + Different Other Stuff = Things :)

My best Alice game:

Clash of the Cubes (an arena fighting game):
http://www.alice.org/community/showthread.php?t=10738&highlight=game
   
Reply With Quote
Old
Killerzeron
Member
 
Status: Offline
Posts: 19
Join Date: Dec 2014
Location: Mumbai
Default 01-08-2015, 09:53 PM

Quote:
Originally Posted by RavenOfCode View Post
So what I did was remake the world with missiles that hold the firing code in them. So all you have to do is:
1. Make a copy of the missile
2. Make a copy of the missiles smoke
3. Before shooting the missile play the setupSmoke method (I suggest when world starts play the setup method on the missile using the smoke)
4. When you shoot the missile it can be used on any plane/thing, there are alot of parameters that will pop up and ask you what to use, I think they are self explanitory, whatPlane is the plane your using, missileSmoke is the missiles smoke, dropDistance is the distance it will get dropped, ect.

Hope this helps,
RavenOfCode
ah, alright thanks. I am still working on the collision and exploding code

(i have the explosion codes, just need to link the if/else commands with collisions and explosion)
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.