Jump to content

Array Properties not inheriting... at all.


TheFuzzler

Recommended Posts

Hello,

 

Parent Script:

 

This script returns "This slot = Iron Sword"

Weapon[] Property CurWpn Auto

Event OnKeyDown(Int KeyCode)
    If KeyCode == 48
        Notification("This slot = " + CurWpn[0].GetName())
    EndIf
EndEvent

Child Script

 

This script returns "This slot = "

(extends above script)

Event OnKeyDown(Int KeyCode)
	If KeyCode == 02	
		Notification("This slot = " + CurWpn[0].GetName())
	EndIf
EndEvent

When I use a none-array property they return the same thing.. (as in pressing b does the same thing as pressing 1)

 

I've tried putting this into a function within the parent script. the function calls correctly but CurWpn[0] is still = 0

This makes no sense to me.

 

Any explanations?

 

Cheers.

 

 

 

update:

Thought it might have been because my parent script couldn't read information from the child script or something, but that was wrong. Had a choice of merging the scripts or creating another 7 preoprties and then setting them based on the array or something.

Ended up merging scripts.

Edited by TheFuzzler
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...