About structures

Just starting out? Need help? Post your questions and find answers here.
GenRabbit
Enthusiast
Enthusiast
Posts: 118
Joined: Wed Dec 31, 2014 5:41 pm

About structures

Post by GenRabbit »

Is there a way to "build" larger structures that are build upon smaller without getting alooooooooooooong path? Something like Microsofts 'ex' structures?

Example;

Code: Select all

	Macro mWeaponSkills()
		ID.l
		BaseAttackSkill.u
		BaseParrySkill.u
	EndMacro
	
	Structure SWeaponSkills
		mWeaponSkills()
	EndStructure
	
	Structure WeaponSkills
		mWeaponSkills()
		Name.s
	EndStructure
	Define.SweaponSkills s
	Define.WeaponSkills t
	s\id = 8
	Debug s\id
When I write s\ I get "mWeaponSkills" from the editor as the path. And then nothing. If I write s\mWeaponSkills\id I will not work(obvious). s\Id will.

But what I would like too see here in the editor when using "s" or "t" is id or Baseattack or Baseparry and the last Name. Any way to get that done?

Short what I should get in Editor is when using SWeaponSkills is like its made like this;

Code: Select all

	Structure SWeaponSkills
		ID.l
		BaseAttackSkill.u
		BaseParrySkill.u
	EndStructure
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: About structures

Post by #NULL »

place cursor on 'Structure' and press F1. In the doc there you get and example for 'Extends'
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: About structures

Post by Josh »

Code: Select all

Structure SWeaponSkills
  ID.l
  BaseAttackSkill.u
  BaseParrySkill.u
EndStructure

Structure WeaponSkills Extends SWeaponSkills
  Name.s
EndStructure
sorry for my bad english
GenRabbit
Enthusiast
Enthusiast
Posts: 118
Joined: Wed Dec 31, 2014 5:41 pm

Re: About structures

Post by GenRabbit »

Thanks for the tips. I had read extend earlier. But got some confused. Thanks for the Tip there Josh. That was easier to understand than the one in the manual :)
Post Reply