About Store Forum Documentation Contact



Post Reply 
Lights
Author Message
Seba Offline
Member

Post: #1
Lights
If i create torch i want light to move a bit. I see that in Esenthel RPG we have that effect but i dont have any idea how to do it. Can someone help me?
Particle and light i add in WE i use point light.
(This post was last modified: 12-18-2009 07:39 PM by Seba.)
12-18-2009 07:38 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Lights
you can use skeleton on torch and specify the light position
12-18-2009 08:52 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #3
RE: Lights
i created a torch flicker effect by moving the light possition by a tiny random amount each frame... worked pretty well
12-18-2009 09:31 PM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #4
RE: Lights
I make something like you say using time and then change position but i dont like this effect I must try maybe with 2 lights point or better set time. Thanks for help.
I have a general question to programing.
You use private variables in your structure:
For example:
Quote:struct ITEM : Game::Item
{
public:
// manage
void create(Game::ObjParams &obj);

// draw
void draw ();
void drawIcon(Vec2 &pos);

// io
void save(File &f);
Bool load(File &f);
//get private data
inline Byte getType(){return type;}
inline Byte getType2(){return type2;}
inline Char getName(){return name[32];}
inline Flt getAttack(){return attack;}
inline Flt getDefense(){return defense;}
inline Image* getIcon(){return icon;}
//designer
ITEM();

private:
Char name[32];
Byte type;
Byte type2;
Flt attack;
Flt weight;
Flt defense;
Image *icon;
};
What do you think about it use it or no i single player game?
And what about ilnine functions?
(This post was last modified: 12-18-2009 10:24 PM by Seba.)
12-18-2009 09:40 PM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #5
RE: Lights
I have ITEM struct like i show up. I want make inventory but i can't done this:
Quote:
ListGroup lg[]=
{
ListGroup(MEMBER(ITEM,ITEM::getIcon() ),0.2f,L"Icon" ), // 0
ListGroup(MEMBER(ITEM,ITEM::getName() ),0.5f,L"Name" ), // 1
ListGroup(MEMBER(ITEM,ITEM::getAttack()),0.2f,L"Power"), // 2
};
I've got errors:
Quote:1>------ Build started: Project: Tutorials, Configuration: Debug Win32 ------
1>Compiling...
1>Inventory Gui.cpp
1>f:\esenthelenginesdk konkurs rpg\esenthelenginesdk\tutorials\rpg\inventory gui.cpp(44) : error C2665: 'EE::ListGroup::ListGroup' : none of the 4 overloads could convert all the argument types
1> e:\microsoft visual studio 9.0\vc\include\esenthelengine\gui\list.h(31): could be 'EE::ListGroup::ListGroup<EE::Image*>(TYPE &,Flt,CChar *)'
1> with
1> [
1> TYPE=EE::Image *
1> ]
1> while trying to match the argument list '(EE::Image *, float, const wchar_t [5])'
1>f:\esenthelenginesdk konkurs rpg\esenthelenginesdk\tutorials\rpg\inventory gui.cpp(44) : error C2466: cannot allocate an array of constant size 0
1>f:\esenthelenginesdk konkurs rpg\esenthelenginesdk\tutorials\rpg\inventory gui.cpp(44) : error C2440: 'initializing' : cannot convert from 'int' to 'EE::ListGroup'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>f:\esenthelenginesdk konkurs rpg\esenthelenginesdk\tutorials\rpg\inventory gui.cpp(45) : error C2665: 'EE::ListGroup::ListGroup' : none of the 4 overloads could convert all the argument types
1> e:\microsoft visual studio 9.0\vc\include\esenthelengine\gui\list.h(31): could be 'EE::ListGroup::ListGroup<Char>(TYPE &,Flt,CChar *)'
1> with
1> [
1> TYPE=Char
1> ]
1> while trying to match the argument list '(Char, float, const wchar_t [5])'
1>f:\esenthelenginesdk konkurs rpg\esenthelenginesdk\tutorials\rpg\inventory gui.cpp(46) : error C2665: 'EE::ListGroup::ListGroup' : none of the 4 overloads could convert all the argument types
1> e:\microsoft visual studio 9.0\vc\include\esenthelengine\gui\list.h(31): could be 'EE::ListGroup::ListGroup<Flt>(TYPE &,Flt,CChar *)'
1> with
1> [
1> TYPE=Flt
1> ]
1> while trying to match the argument list '(Flt, float, const wchar_t [6])'
12-19-2009 12:02 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Lights
you can't use MEMBER on methods,
please check "properties" tutorial in GUI
to see how to work with member/data description and methods
DataDesc::setFunc will be used
12-19-2009 01:16 AM
Find all posts by this user Quote this message in a reply
Seba Offline
Member

Post: #7
RE: Lights
The first argument to don't use private variables. Thanks for help.
12-19-2009 10:51 AM
Find all posts by this user Quote this message in a reply
Post Reply