Page 7 of 25

Posted: Mon Oct 20, 2008 4:48 pm
by Trinitron
btw, in Tut15. Death of Enemies there is an error. The question in that is it really error or the conceived typing error of the author?[:D]

This example does not work. Here:

Code: Select all

ork1.ImDeadFunc= Ork1DED

# In DefFuncs:

def Ork1DED(entity)
    if me.Data.OldImDeadFunc(entity)
    print "Ork1 is dead..hahahahaha. Opening door"

If to add '<font color="yellow">:</font id="yellow">', function will work

Code: Select all

ork1.ImDeadFunc= Ork1DED

# In DefFuncs:

def Ork1DED(entity)<font color="yellow">:</font id="yellow">
    if me.Data.OldImDeadFunc(entity)<font color="yellow">:</font id="yellow">
    print "Ork1 is dead..hahahahaha. Opening door"

Posted: Wed Oct 22, 2008 12:37 pm
by Trinitron
prospero, you could check up files with VMBlackKnigth?

I have corrected the name, that you have resulted above - all does not work exactly.[B)]
Probably it would be better, if you lay out ready (only in scripts), a map ready to application....[:I]

Posted: Wed Oct 22, 2008 1:50 pm
by prospero
Yes, I will do it to-night if not too tired.[|)]

Thanks for spotting my code error.[:D]

...You are learning.[;)]

Posted: Sat Oct 25, 2008 12:34 pm
by Tomash
When you have large group of hidden enemies, and you want to unhide them in following case:
First some emenies appear. When one of them die(any one) the next enemy appears.
You can use following code:

#Enemies must be named like 'enm_1' , 'enm_2' ... With ' not "
#And after enemy creating code you shall write:
o.Data.ImDeadFuncPlus = o.ImDeadFunc
o.ImDeadFunc = NextEnemyAppears

# In DefFuncs make a function:

k=2 # If 2 enemies appear first

def NextEnemyAppears(HowManyEnemiesDie):
________global k
________global prenumber
________global number
________global enmname

________number="enm_"+prenomer+"" ### we get Sk_3 , Sk_4 ...
________enmname="'"+nomer+"'" ### we get 'Sk_3' , 'Sk_4' ...

Posted: Sat Nov 01, 2008 9:12 am
by Tomash
Hi all :)

#I want to use ghost pointer to launch function. I wrote:

ghostp=Bladex.CreateEntity("stone1","GhostPointer", -24438,-1010,16503)
ghostp.UseFunc = DoSomething
darfuncs.SetHint(ghostp,"Loose Stone")

# Ghost pointer itself is created and I can see its name and select it.
#But when I select it and press "use" - it does NOT launch the function "DoSomething". What may be cause of it?)

Posted: Sat Nov 01, 2008 10:24 am
by prospero
Hi Tomash.

A 'Use' function needs two arguments:

Code: Select all

def DoSomething(ghostpointer, usefrom):
    print "Done Something"
You rarely need to make use of them, but they need to be defined in the function header.

Posted: Wed Nov 05, 2008 7:27 am
by Tomash

Posted: Fri Nov 07, 2008 9:04 am
by Tomash
HI :)

I made my map as a mod. And I have some trouble with mod's menu. In my I used the code from the, writing my names of files and path to files. And I have in console:

"Error Creating frame of class MenuWidget.B_MenuTree"

What it is? :)

Posted: Fri Nov 07, 2008 12:12 pm
by prospero
Hi Tomash.

I have had this more than a few times. It will be a fault in the Quite hard to track down. If you want to send me your, I will see if I can spot the error.[8)]


(at) = @

Some times it works if you start from the begining and make a completely new But delete the copy of in Scripts folder before you run the map.

Posted: Sat Nov 08, 2008 8:54 am
by Tomash
Hi Prospero )

I sent you my
Message from [email protected]

Posted: Thu Nov 13, 2008 9:09 am
by Trinitron
Hi prospero.[8)]

Big to you thanks for that code which I have received, fashions really work.
At me it is some questions on it.

I have found in a code, that the trigger sector has co-ordinates

Code: Select all

(0, 0,-25000)
and the place where should will appear VMBlackKinght -

Code: Select all

So there is no this knight. In what a problem? I have run all map - anywhere there is no it. Explain, how to me you to game to cause it.

Still such question. In folder NUFiles there are three files - AllyNPCTypes, EnemyNPCTypes.
In these files I have found out superfluous functions, for example:

Code: Select all

	def ResetSounds(self, EntityName):
		me = Bladex.GetEntity(EntityName)
<font color="yellow">	AniSoundIrDwarf.AsignarSonidosIrDwarf(EntityName)
		Reference.EnemiesScorerData[self.Name]=("IrDwarfIcon","Ird")</font id="yellow">	
	def ToolUp(self):
		me = Bladex.GetEntity(self.Name)
		rwptype=self.IrDwarfWeps[whrandom.randint(0, len(self.IrDwarfWeps)-1)]
		lwptype=self.IrDwarfShds[whrandom.randint(0, len(self.IrDwarfShds)-1)]
		if rwptype:
		if lwptype:

Code: Select all

def LoadXtraAnims():




	<font color="yellow">Bladex.LoadSampledAnimation("..\\..\\Anm\\Tkn_fury.BMV","Fury",1,"IrDwarf_N")
	Bladex.AddBipedAction("IrDwarf_N","Fury","Tkn_fury",0.0,1.0,0)</font id="yellow">
and, maybe, other code.

Claims are not present, but this code is necessary or it can be removed, that there would be an information only on VMBK.
But, nevertheless I am am disturbed by a question on not to occurrence in game VMBK.

Posted: Sat Nov 15, 2008 8:01 am
by Trinitron
And still such here the question, can not considerable, but probably many the irritating.


What would not be ladders and inclinations - the character on them runs and often happens so, that he runs on a ladder and then as though falls from a step on a step through a step.

It can be corrected somehow or it is feature of a cursor? That for example the attraction would not be also the character did not come as invisible blocks. It is difficult to explain, as I badly know English, I hope that you have understood, that I had in view of.

That the character would be started up on ladders as the normal person and did not fall.[:o)]

Posted: Sat Nov 15, 2008 9:45 am
by prospero
Hi Trintron.

For ladders read steps or stairs.[:)]

If you make steps too big or too steep, the BOD engine will sense a drop and launch the appropriate animation. For realistic stairways the maximum height of the step should be about 0.5 of a LED unit.
0.3 high and 0.75 along is nice.

Posted: Sat Nov 15, 2008 10:32 am
by Trinitron
Hi prospero.[8)]

0.3 high and 0.75 along - thanks, I will consider on the future.

But I wished to ask probably another, after all it in any way cannot be avoided? That the cursor would not perceive falling of characters from abrupt inclinations (for example a corner in 45 degrees.) that the character somehow would run on inclinations and each time did not fall from them.

And still the question, prospero, at you works call VMBK? Scripts are on it, and it is not present on map, or you did not do, what it would be?[B)]

Posted: Sat Nov 15, 2008 11:05 am
by prospero
I think there is a method in the BOD engine that checks collisions many times per second to keep the characters on the ground. Sometimes if you are moving quickly they can sink through the floor. Nothing much you can do about it. If a slope is over a certain angle, the slip animation is triggered.

Not sure what you mean about the VM Knight. Doesn't he appear?