Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Apr 18, 2024 3:36 am
All times are UTC + 0
Need help with Occuping logic
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
cyber snake
Vehicle Drone


Joined: 30 Oct 2009

PostPosted: Thu Dec 29, 2011 9:47 pm    Post subject:  Need help with Occuping logic
Subject description: How do you make a infantry garrison in a building but not fire a weapon?
Reply with quote  Mark this post and the followings unread

How do you make it so that an Infantry unit can garrison in a UC Building but not fire out of it?

I'm trying to make it so that the Allied, soviet and Yuri Attack dogs can Garrison in UC-Buildings but I don't want them to fire out of the Building I just want them in for safety in combat situations

If I set the occupy weapon to 0 or None it reverts to the Primary weapon [BadTeeth] which if used Crashes the game. The Dog Jumps out and the building disappears Crashing the game.

Do I have to make a weapon or warhead that does nothing?


Please Help reply or PM me thank you

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Thu Dec 29, 2011 9:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

You answered your own question, tho in Dogs cases, I'd set the occupyweapon to 1, since VirtualScanner is already a dummy weapon.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
cyber snake
Vehicle Drone


Joined: 30 Oct 2009

PostPosted: Thu Dec 29, 2011 10:42 pm    Post subject:  How do I make a new Weapon? Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
You answered your own question, tho in Dogs cases, I'd set the occupyweapon to 1, since VirtualScanner is already a dummy weapon.


Ok so how do I make a weopon that does nothing then? -I can copy a weapon and some what alter it


I want to call it UCNONE

so any infantry that uses this can not use UC weapons in buildings.

please help me make this don't know how to make a new weapon Embarassed

Back to top
View user's profile Send private message
m7
Commander


Joined: 17 Apr 2009

PostPosted: Thu Dec 29, 2011 10:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Look at examples of other weapons. Creating a weapon is not hard.

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 30, 2011 9:49 am    Post subject: Reply with quote  Mark this post and the followings unread

FYI, I won't spoonfeed you through PMs. I see no benefit of mine within it.

Hell, there are already a lot of dummy weapons within rulesmd.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Atomic_Noodles
Defense Minister


Joined: 05 Oct 2011

PostPosted: Fri Dec 30, 2011 10:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Warhead:
Code:
[DumWeap]
Verses=0%,0%,0%,0%,0%,0%,0%,0%,0%,0%,0%


Weapon:
Code:
[OccupyDummy]
Damage=0
ROF=0
Range=0
Projectile=InvisibleHigh
Speed=100
Warhead=DumWeap


0% in all the Verses makes that weapon unusable for that type. and since it's 0% in all types. The Weapon will not be usable at all.

_________________
~ Excelsior ~

Back to top
View user's profile Send private message Visit poster's website
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 30, 2011 10:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Or... NeverUse=yes on the weapon and nothing else needed. This is why Dogs' VirtualScanner would be fine.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
cyber snake
Vehicle Drone


Joined: 30 Oct 2009

PostPosted: Fri Dec 30, 2011 5:10 pm    Post subject:  It works super! Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
Or... NeverUse=yes on the weapon and nothing else needed. This is why Dogs' VirtualScanner would be fine.


Thanks for helping me out works great the dogs can garrison without crashing the game now

[DummyVirtualScan]; any Infantry unit with this renders weapon unusable Credits to Graion Dilach and Atomic_Noodles for helping me out with the codes
Damage=0;1
Range=0;5
NeverUse=yes
Projectile=InvisibleAll
Warhead=SA
Speed=100

Thanx guys

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Fri Dec 30, 2011 5:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

*glares to the monitor*

You sir, have failed my IQ test. And ten bucks say, you managed to mess up the Dogs spy-catching behaviour.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
cyber snake
Vehicle Drone


Joined: 30 Oct 2009

PostPosted: Fri Dec 30, 2011 6:58 pm    Post subject: No Problems yet Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
*glares to the monitor*

You sir, have failed my IQ test. And ten bucks say, you managed to mess up the Dogs spy-catching behaviour.


Nope working fine Very Happy
This is a copy of the Virtual scaner Haven't touched the original

; Attack dog
[ADOG]
UIName=Name:DOG
Name=Allied Attack Dog
NotHuman=yes
Category=Soldier
Primary=GoodTeeth
Secondary=VirtualScanner
Occupier=yes ; I can Occupy UC buildings
OccupyWeapon=DummyVirtualScan; The weapon I use while Occupying. Defaults to 0 (Primary)
NavalTargeting=6
Prerequisite=Barracks
LeadershipRating=7
CrushSound=InfantrySquish
Strength=100
Armor=none
ReselectIfLimboed=yes ; If selected when limbo and attacking infantry, reseect when unlimbo
RejoinTeamIfLimboed=yes ; If in a team when limbo shooting infantry, write it down and try to rejoin when unlimbo
DefaultToGuardArea=yes ; the much awaited dog default to move and attack when resting
TechLevel=2
Pip=white
Sight=9
DetectDisguise=yes
Speed=8
Owner=Russians,Confederation,Africans,Arabs,YuriCountry,British,French,Germans,Americans,Alliance
ForbiddenHouses=Russians,Confederation,Africans,Arabs,YuriCountry
Cost=200
Soylent=100
Points=10
IsSelectableCombatant=yes
VoiceSelect=DogSelect
VoiceMove=DogMove
VoiceAttack=DogAttackCommand
VoiceFeedback=DogFear
VoiceSpecialAttack=DogMove
DieSound=DogDie
Locomotor={4A582744-9839-11d1-B709-00A024DDAFD1}
PhysicalSize=1
MovementZone=Infantry
;MovementZone=InfantryDestroyer ;GEF wow!!! copy paste bug from the original Disk Thrower!
ThreatPosed=20 ; This value MUST be 0 for all building addons
ImmuneToRadiation=no
Bombable=yes
AllowedToStartInMultiplayer=no
Size=1
VeteranAbilities=STRONGER,FIREPOWER,ROF,SIGHT,FASTER,SCATTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ImmuneToPsionics=yes
IFVMode=0
Trainable=no
Natural=yes

[VirtualScanner]; This is so units with range one weapons will scan out farther when looking for targets in guard
Damage=1
Range=5
NeverUse=yes
Projectile=InvisibleAll
Warhead=SA
Speed=100

[DummyVirtualScan]; any Infantry unit with this renders weapon unusable
Damage=0;1
Range=0;5
NeverUse=yes
Projectile=InvisibleAll
Warhead=SA
Speed=100

i'll let you know if something goes wrong

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Sun Jan 01, 2012 3:51 am    Post subject: Re: No Problems yet Reply with quote  Mark this post and the followings unread

cyber snake wrote:
Graion Dilach wrote:
*glares to the monitor*

You sir, have failed my IQ test. And ten bucks say, you managed to mess up the Dogs spy-catching behaviour.


Nope working fine Very Happy
This is a copy of the Virtual scaner Haven't touched the original


You do realize making an exact copy of an existing weapon is wasting space, correct? Weapons can be used on more than 1 unit.
And I'm not criticizing you to be an ass, just to point out that you're making the same mistakes westwood made. And WW is guud pepple.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
cyber snake
Vehicle Drone


Joined: 30 Oct 2009

PostPosted: Sun Jan 01, 2012 4:51 am    Post subject:  So how do I make this weapon then? Reply with quote  Mark this post and the followings unread

Nope working fine Very Happy
This is a copy of the Virtual scaner Haven't touched the original [/quote]

You do realize making an exact copy of an existing weapon is wasting space, correct? Weapons can be used on more than 1 unit.
And I'm not criticizing you to be an ass, just to point out that you're making the same mistakes westwood made. And WW is guud pepple.[/quote]

I'm just trying to make a simple weapon that infantry units use to garison in a building without firing. (Mainly the Attack dogs)

all iv'e done is copied virtual scanner and pasted below the original
then I changed the name to [DummyVirtualScan] set the damage=0 and the rage=0 I left the Projectile and warhead alone -Don't understand Versus clear enough yet.

I tested it out ran ARES.Bat
Trained a Attack [ADOG] then sent him in to a building just like I would when sending a GI in he went in and came out without any problems and didn't fire out of the building. The Spy logic still works he still chases after a spy and attacks them-(Not in building of course)

if the allied dog was in a building it be cool if he could de cloak the enemy spy so I could send my units to attack him. - but what would I do to achieve this?


what do you mean on this? [Weapons can be used on more than 1 unit.]I know you can give a unit a primary secondary and (UC weapon for infantry anyway) please explain.
and this [WW is guud pepple.] Huh?

do you know a better way to do the code? if you do please share (most appreciate it) if not could you explain your code on how you would do this -in clear full detail please

Please reply or PM me thanx

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Sun Jan 01, 2012 10:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Reread my first post in this topic, that's where I told you how to have a better style of coding.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
cyber snake
Vehicle Drone


Joined: 30 Oct 2009

PostPosted: Sun Jan 01, 2012 11:57 am    Post subject:  Going to try another test Reply with quote  Mark this post and the followings unread

Graion Dilach wrote:
Reread my first post in this topic, that's where I told you how to have a better style of coding.


ok Iv'e read this [you answered your own question,tho in Dogs cases,I'd set the Occupyweapon to 1,since VirtualScanner is already a dummy weapon.]

so how did I answer my question again?

what do you mean set [I'd set the Occupyweapon to 1]. one what?

since VirtualScanner is already a dummy weapon. Dumb question what's a Dummy weapon?

Neveruse=yes is already on the virtual scanner look

Original Code not changed

[VirtualScanner]; This is so units with range one weapons will scan out farther when looking for targets in guard
Damage=1
Range=5
NeverUse=yes
Projectile=InvisibleAll
Warhead=SA
Speed=100

Wait a minute so your saying use Virtual scanner as the UC weapon and the dog will still catch spies?

Hang on i'm gonna get rid of this copy of code and try using the virtual scanner

I think I understand correct me if i'm wrong

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1571s ][ Queries: 11 (0.0072s) ][ Debug on ]