Advertisement

can i call a method from base class?

Started by October 09, 2010 09:55 PM
2 comments, last by WitchLord 14 years, 1 month ago
for example

file: test.as


class a
{
int b;
call(){ b++; }
}

class b : a
{
int c;
call(){...; c++ ;}//here, i want first to call "a::call()", then execute "c++", in c++ i only to use a::call(); but in as, how can i do it ?or ,as donot support this ?
}

another question

how to use bool value as argument to class method.
forexample

//as

void returna( bool t )
{
}

//c++

int funid = m_objtype->GetFunctionIdByName("returna");
asIScriptContext * p_ctx = m_engine->CreateContext();
p_ctx->Prepare(funid);
p_ctx->SetArg?????//here ,what i want to use ? SetArgByte? or another?

thanks all.


I had to guess that AS is ActionScript. try:
super.call();


**edit
Didn't notice this forum is called AngelScript xD. Anyway, it should work the same as C++ from what I can find.

a::call();


source
Two things are infinite: the universe and human stupidity; and Im not sure about the universe. -- Albert Einstein
Advertisement
thank you, in as it is really that use a::call()
Manual: Script classes

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement