logo   login
right
Home Forums Downloads Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Forum Info
Forum Members: 18,581
Total Threads: 8,669
Posts: 94,547

Administrators:
DeeZire, Redemption

There are currently 48 users online.
Partner Links

Free Credit Repair

Learn the Ticket Broker Secrets
Advertisements


Generals & Zero Hour Editing Discuss any modding related issues to do with Generals and Zero Hour here.

Reply
 
LinkBack Thread Tools
Old 09-16-2004, 12:03 AM   #1 (permalink)
Junior Member
 
Join Date: Aug 2004
Posts: 29
Default Coding Question regarding Spawning

OK... here's the situation...

In my mod, I want a specific general to be able to upgrade the GLA Stinger Site so it spawns different troops in place of the stinger soldiers. Example is one upgrade, which will replace the stinger soldiers with three machinegunners.

My question is... is it possible to make that work, and if so, how do I do that.
Sauragnmon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-16-2004, 12:57 AM   #2 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 872
Default

What you need is a seperate Stinger site for each one. You will find in the Object ini for the Stinger Site.

Replace them for each of your differant Stinger types. I've seen people place Patriots and Gattling cannons in Stinger site though they may have actually changed the model not spawned the object.

Behavior = SpawnBehavior ModuleTag_06
SpawnNumber = 3
SpawnReplaceDelay = 30000 ;msec
SpawnTemplateName = GLAInfantryStingerSoldier
CanReclaimOrphans = No
SpawnedRequireSpawner = Yes
SlavesHaveFreeWill = No
End


SpawnTemplateName will allow to change the unit that is spawned.
Hostile is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-16-2004, 01:21 AM   #3 (permalink)
Senior Member
 
Join Date: Feb 2003
Location: USA
Posts: 853
Send a message via AIM to mastermind2003 Send a message via MSN to mastermind2003
Default

If you put in multiple SpawnTemplateName's you can place multiple different infantry in the stinger site. There is one problem though, as they will not appear if killed correctly all the time. They are instead replaced from the location in the list that the game last used. It's a clever little trick, but has a few bugs.
mastermind2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-16-2004, 02:57 PM   #4 (permalink)
Junior Member
 
Join Date: Aug 2004
Posts: 29
Default

Hmmm... I was hoping to be able to simply swap the troops with an upgrade... guess I'll have to go for the other option and give him four different sites... which means I'll have to do something about his worker's command set, since he doesn't have enough space on one command set to do the construction... maybe replace the fake building command set... *sticks his pencil behind his ear* time to go back to the drawing board...
Sauragnmon is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-17-2004, 12:53 AM   #5 (permalink)
Senior Member
 
Join Date: Feb 2004
Posts: 872
Default

Well there is an upgrade called ReplaceObject. That will allow you to change one Stinger site for another after an upgrade. Problem is your health resets and so does you veterency.

Mithral talked about a work around using kill module that somehow retains the info. Have to ask him that.

What you can do is actually an object upgrade. That way the object being upgraded uses his commandset to fire the upgrade, not the worker having to build differant types.

Well you start with your generic Stinger Site, than on your commandset have a button that fires your upgrade, upon upgrade to have your ReplaceObject actually switches your object.

The spawned units HAVE to have the site to survive, so they will probably drop dead but then your new Site should replace them. Not sure how easy it would be to go switching back and forth though.
Hostile is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-17-2004, 04:24 AM   #6 (permalink)
Junior Member
 
Join Date: Jun 2003
Posts: 2
Default

I've been away from modding for a long time but couldn't you use an upgrade command that uses the kill switch. That way you could kill off any infantry type within the stinger and replace it with whatever? I think it could be done relativly easy but I wont hold my breath...i'll try it myself and post my failure later.
Arkane is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-17-2004, 05:27 AM   #7 (permalink)
Junior Member
 
Join Date: Jun 2003
Posts: 2
Default

Ok told you I would fail...well, I don't give up that easily but I need a few hours of sleep before work. Anyway I'll try again later but as of now I did create an upgrade using the kill switch to keep vet stats and replace them with rebels. The only problem is they die when the structure is destroyed and only rpg troops will survive. Like I said I don't give up so easily, so I'll let ya know later.
Arkane is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-11-2005, 03:32 PM   #8 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

You could do it but as a player upgrade.

Simply give the stinger infantry a replaceobject module which is triggered by a player upgrade.

Now, given the fact you want to swap them for machinegunners, I would suggest making the upgrade give them a machine gun as additional which is only used against infantry, otherwise you will screw your Stinger Site's AA ability.

another idea would be to have a duplicate stinger infantry (different object) which only has the replace object upgrade (all the others dont have it), and the upgrade only turns that one infantry into a full machinegunner.
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-11-2005, 04:21 PM   #9 (permalink)
Senior Member
 
Join Date: May 2003
Location: Eindhoven, Netherlands
Posts: 2,278
Send a message via ICQ to CodeCat Send a message via MSN to CodeCat
Default

Waraddict, this topic is 4 months old...
CodeCat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-11-2005, 06:08 PM   #10 (permalink)
Senior Member
 
Join Date: Mar 2003
Location: Rep. of Ireland
Posts: 373
Default

I was searching for something, this came up, I read it and responded to it before I noticed the date
Waraddict is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

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
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A question of AI coding... full_circle Generals & Zero Hour Editing 6 08-16-2006 08:18 PM
MLRS coding question... juLLe Generals & Zero Hour Editing 7 07-06-2004 01:40 PM
Coding Question on a Generals Power Juggernaut1985 Generals & Zero Hour Editing 5 05-19-2004 11:44 AM
Coding question.. needleman Red Alert 2 & Yuri's Revenge Editing 1 12-28-2003 03:01 PM
Spawning damo1 Generals & Zero Hour Editing 3 04-14-2003 04:18 PM


All times are GMT -4. The time now is 06:27 PM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.