[Mod] Rocket

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

[Mod] Rocket

Post by Gyrth » Thu Jul 24, 2014 9:17 am

So I found out how to use the Update() in hotspots. Very usefull. It makes a lot more mods possible.

This is a homing missile. It targets anyone who walks into the hotspot. And has a blast radius. Ctrl + U for the parameters.

Even with help from people in the IRC I couldn't get the rotation right. I'm very bad at linear algebra. If anyone knows how to sincostan this thing in the flight direction, that would be much appreciated.



Fixed: forgot about pointing to the right hotspot icon directory.
Fixed: the rotation now works! Thank you David!

Fixed: multiple rockets supported, just add as many rocket_hotspot.xml as you wish, no prefab anymore.
Added: A line between the hotspot and rocket that will be triggered.
RocketV3.zip
(448.74 KiB) Downloaded 235 times
Last edited by Gyrth on Mon Jul 28, 2014 5:58 pm, edited 3 times in total.

User avatar
Surak
Posts: 349
Joined: Sun Sep 20, 2009 3:27 pm
Contact:

Re: [Mod] Rocket

Post by Surak » Thu Jul 24, 2014 11:50 am

Very nice. What happens if there is an object between the rocket and the player? Does it just clip through it?

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

Re: [Mod] Rocket

Post by Gyrth » Thu Jul 24, 2014 11:53 am

Surak wrote:Very nice. What happens if there is an object between the rocket and the player? Does it just clip through it?
Yes, it's just an Object. Might find a solution for that later. GetObjectsInSphere or something.

User avatar
Constance
Overgrowth Modder Deluxe
Posts: 2394
Joined: Sat Mar 17, 2012 2:05 pm
Contact:

Re: [Mod] Rocket

Post by Constance » Thu Jul 24, 2014 6:11 pm

I've always had a few ideas with combining the landmines and using the dialogue editor, and maybe the rocket.
Either way, we're coming closer to making WWII in Overgrowth.

Lone_Pickle
Posts: 7
Joined: Thu Jul 24, 2014 4:27 pm

Re: [Mod] Rocket

Post by Lone_Pickle » Thu Jul 24, 2014 6:16 pm

I installed this, because it looks so darn good, but it doesn't seem to have worked. Could you please run through the installation process just in case I missed something out?
Sorry to bother you with something so trivial, but I am desperate to experiment with this.
Last edited by Lone_Pickle on Thu Jul 24, 2014 6:25 pm, edited 1 time in total.

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

Re: [Mod] Rocket

Post by Gyrth » Thu Jul 24, 2014 6:24 pm

Lone_Pickle wrote:I installed this, because it looks so darn good, but it doesn't seem to have worked. Could you please run through the installation process just in case I missed something out?
Open up /Data/Custom/gyrth/rocket/Objects/rocket_prefab.xml and place it somewhere. By default it's friendly. So it won't shoot you. Select the rocket and click Ungroup. Select the hotspot and Ctrl + U and uncheck Friendly if you want it to shoot you.

Lone_Pickle
Posts: 7
Joined: Thu Jul 24, 2014 4:27 pm

Re: [Mod] Rocket

Post by Lone_Pickle » Thu Jul 24, 2014 6:35 pm

Gyrth wrote:
Lone_Pickle wrote:I installed this, because it looks so darn good, but it doesn't seem to have worked. Could you please run through the installation process just in case I missed something out?
Open up /Data/Custom/gyrth/rocket/Objects/rocket_prefab.xml and place it somewhere. By default it's friendly. So it won't shoot you. Select the rocket and click Ungroup. Select the hotspot and Ctrl + U and uncheck Friendly if you want it to shoot you.
I'm still confused. I just started manually modding the game today, and I can't find the rocket anywhere in-game. I think I made a mistake installing it.

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

Re: [Mod] Rocket

Post by Gyrth » Thu Jul 24, 2014 6:53 pm

Lone_Pickle wrote:
Gyrth wrote:
Lone_Pickle wrote:I installed this, because it looks so darn good, but it doesn't seem to have worked. Could you please run through the installation process just in case I missed something out?
Open up /Data/Custom/gyrth/rocket/Objects/rocket_prefab.xml and place it somewhere. By default it's friendly. So it won't shoot you. Select the rocket and click Ungroup. Select the hotspot and Ctrl + U and uncheck Friendly if you want it to shoot you.
I'm still confused. I just started manually modding the game today, and I can't find the rocket anywhere in-game. I think I made a mistake installing it.
Are you sure you opened rocket_prefab.xml? Any errors? Did it spawn a hotspot?

Lone_Pickle
Posts: 7
Joined: Thu Jul 24, 2014 4:27 pm

Re: [Mod] Rocket

Post by Lone_Pickle » Thu Jul 24, 2014 7:02 pm

Gyrth wrote:
Lone_Pickle wrote:
Gyrth wrote: Open up /Data/Custom/gyrth/rocket/Objects/rocket_prefab.xml and place it somewhere. By default it's friendly. So it won't shoot you. Select the rocket and click Ungroup. Select the hotspot and Ctrl + U and uncheck Friendly if you want it to shoot you.
I'm still confused. I just started manually modding the game today, and I can't find the rocket anywhere in-game. I think I made a mistake installing it.
Are you sure you opened rocket_prefab.xml? Any errors? Did it spawn a hotspot?
I'm just really confused now.
I can't open rocket_prefab.xml. I don't know how to open it in-game, and if I try to with any external .xml file reader it tells me the file is not a valid .xml file.
I really don't know what I'm doing now.

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

Re: [Mod] Rocket

Post by Gyrth » Thu Jul 24, 2014 7:06 pm

I'm just really confused now.
I can't open rocket_prefab.xml. I don't know how to open it in-game, and if I try to with any external .xml file reader it tells me the file is not a valid .xml file.
I really don't know what I'm doing now.
I don't know what you are doing as well. Did you unzip it? Put the Data folder inside your OG install, merge folders.

Lone_Pickle
Posts: 7
Joined: Thu Jul 24, 2014 4:27 pm

Re: [Mod] Rocket

Post by Lone_Pickle » Thu Jul 24, 2014 7:21 pm

Gyrth wrote:
I'm just really confused now.
I can't open rocket_prefab.xml. I don't know how to open it in-game, and if I try to with any external .xml file reader it tells me the file is not a valid .xml file.
I really don't know what I'm doing now.
I don't know what you are doing as well. Did you unzip it? Put the Data folder inside your OG install, merge folders.
I unzipped it and merged it with my Overgrowth Data file. Now what do I do?

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

Re: [Mod] Rocket

Post by Gyrth » Thu Jul 24, 2014 7:27 pm

Lone_Pickle wrote:
Gyrth wrote:
I'm just really confused now.
I can't open rocket_prefab.xml. I don't know how to open it in-game, and if I try to with any external .xml file reader it tells me the file is not a valid .xml file.
I really don't know what I'm doing now.
I don't know what you are doing as well. Did you unzip it? Put the Data folder inside your OG install, merge folders.
I unzipped it and merged it with my Overgrowth Data file. Now what do I do?
Click Load Item. Then the little folder icon (next to the heart). Go to /Data/Custom/gyrth/rocket/Objects/ and open rocket_prefab.xml and place it somewhere.

Lone_Pickle
Posts: 7
Joined: Thu Jul 24, 2014 4:27 pm

Re: [Mod] Rocket

Post by Lone_Pickle » Thu Jul 24, 2014 7:45 pm

Gyrth wrote: Click Load Item. Then the little folder icon (next to the heart). Go to /Data/Custom/gyrth/rocket/Objects/ and open rocket_prefab.xml and place it somewhere.
Wait. I think I realised the mistake I made.
I was modding the backup files.
Sorry.
Oh, but now I've found a genuine problem:
When I come to put down the rocket, I get this:
Error in "rocket.as"
Compiling void OnEnter(MovementObject@)
ERR:rocket.as (39,26) No matching signatures to
'ReadObjectFromID(float)'
ERR: rocket.as (39,83) Illegal operation on 'const int'
Compiling void Update()
ERR: rocket.as(52,5) Identifier 'Object' is not a data type
ERR: rocket.as(53,5) Identifier 'Object' is not a data type

and then it gives me the options of cancel, try again and continue. Try again brings up the same thing, cancel closes Overgrowth, and so does continue.

User avatar
Gyrth
Posts: 225
Joined: Sat Sep 10, 2011 12:49 pm

Re: [Mod] Rocket

Post by Gyrth » Fri Jul 25, 2014 6:51 am

Lone_Pickle wrote:
Gyrth wrote: Click Load Item. Then the little folder icon (next to the heart). Go to /Data/Custom/gyrth/rocket/Objects/ and open rocket_prefab.xml and place it somewhere.
Wait. I think I realised the mistake I made.
I was modding the backup files.
Sorry.
Oh, but now I've found a genuine problem:
When I come to put down the rocket, I get this:
Error in "rocket.as"
Compiling void OnEnter(MovementObject@)
ERR:rocket.as (39,26) No matching signatures to
'ReadObjectFromID(float)'
ERR: rocket.as (39,83) Illegal operation on 'const int'
Compiling void Update()
ERR: rocket.as(52,5) Identifier 'Object' is not a data type
ERR: rocket.as(53,5) Identifier 'Object' is not a data type

and then it gives me the options of cancel, try again and continue. Try again brings up the same thing, cancel closes Overgrowth, and so does continue.
That is weird. Can you try it on Shielded Stands? That one works every time for me. Some of the maps don't work with my turret or rocket.

Lone_Pickle
Posts: 7
Joined: Thu Jul 24, 2014 4:27 pm

Re: [Mod] Rocket

Post by Lone_Pickle » Fri Jul 25, 2014 6:10 pm

Gyrth wrote:
Lone_Pickle wrote:
Gyrth wrote: Click Load Item. Then the little folder icon (next to the heart). Go to /Data/Custom/gyrth/rocket/Objects/ and open rocket_prefab.xml and place it somewhere.
Wait. I think I realised the mistake I made.
I was modding the backup files.
Sorry.
Oh, but now I've found a genuine problem:
When I come to put down the rocket, I get this:
Error in "rocket.as"
Compiling void OnEnter(MovementObject@)
ERR:rocket.as (39,26) No matching signatures to
'ReadObjectFromID(float)'
ERR: rocket.as (39,83) Illegal operation on 'const int'
Compiling void Update()
ERR: rocket.as(52,5) Identifier 'Object' is not a data type
ERR: rocket.as(53,5) Identifier 'Object' is not a data type

and then it gives me the options of cancel, try again and continue. Try again brings up the same thing, cancel closes Overgrowth, and so does continue.
That is weird. Can you try it on Shielded Stands? That one works every time for me. Some of the maps don't work with my turret or rocket.
Nope. I tried it on shielded stands and got exactly the same result.

Post Reply