Logo Platform
logo amplifiers simplified

When are ../ or .../ required?

Reply
Copied to clipboard!
12 years ago
Mar 22, 2013, 6:33:11 PM
I am currently in a big bug hunt for my Fair Fight mod and i am wondering if i am using my "./", "../" and ".../" correctly for my variables. I remember having read something about them but can't remember where. Anyone can refresh my memory?
0Send private message
12 years ago
Mar 22, 2013, 9:22:58 PM
Search my old threads, had a big discussion about them and I still don't totally understand
0Send private message
12 years ago
Mar 23, 2013, 1:46:04 AM
I guess it must be this :



ThorTillas wrote:
too much to read all ^^ sorry but I start to get some heavy work to do on my side so I will need to reduce the time I can spent on the forum...



but :

-> As Nycidian found it, you can only play with the actual commandPoint and not with the maximal one. The MaxCommandPoint is empire wise only, for now at least.

Could be added to the wish list but can have some repercussion on performance...



-> You cannot ask a module to not fire during a round for now. You can ask them to fire ones or two per phase, but no "at all"...

You could set the accuracy to 0 which would have the "same" effect in simulation but will still spawn some projectile in the 3d view.



-> "ClassShip/ClassFleet" will never works.

The simulation is based on a hierarchy which is something like that :



On each step I put an arbitrary name which describe the object and, in [], I add some of the important descriptor you can found on this object (not all descriptors, just the class descriptor).

[Code]

Empire [ClassEmpire]

|->StarSystem1 [ClassStarSystem]

| |->Planet1 [ClassPlanet]

| |->Planet2 [ClassPlanet]

| | |->Moon1 [ClassMoon]

| |->HeroToto [ClassHero]

|->StarSystem2 [ClassStarSystem]

| |->Planet1 [ClassPlanet]

|->HeroInAcademy [ClassHero]

|->Fleet1 [ClassFleet]

| |->Ship1 [ClassShip]

| | |->ModuleDefLaser1 [ClassModule,ClassDefenseModule,WeaponClassLaser]

| | |->ModuleDefLaser2 [ClassModule,ClassDefenseModule,WeaponClassLaser]

| | |->ModuleWeaLaser1 [ClassModule,ClassWeaponModule,WeaponClassLaser]

| | |->ModuleWeaKinetic1 [ClassModule,ClassWeaponModule,WeaponClassKinetic]

etc...

[/Code]



Your path must work in this kind of hierarchy.

So as ClassShip/ClassFleet say "for all children of the ship which is a fleet", you will not be able to do something with ^^. when you want to go up, use :

./ClassToto to get the parent of the current object if the parent has the descriptor "ClassToto"

../ClassToto to get the first parent in the hierarchy which match the descriptor "ClassToto"

.../ClassToto to start at the root of the hierarchy, if the root has the descriptor "ClassToto"



I hope this can help you !



Cheers,

Flo




I think it's begining to make sense...
0Send private message
?

Click here to login

Reply
Comment