Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 10:32
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 604 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
using different skins #127925
05/04/07 02:31
05/04/07 02:31
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Why doesn't this work:

define skin,skill60;

ACTION enemy
{
...
if(my.skill60 == 2){my.skin = 2;}
...
}

I'm trying to use the same model with different skins without using a separate action for each enemy entity.

Re: using different skins [Re: JazzDude] #127926
05/04/07 02:38
05/04/07 02:38
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
remove the "define" above the action and it will work !


I like good 'views' because they have no 'strings' attached..
Re: using different skins [Re: zazang] #127927
05/04/07 02:59
05/04/07 02:59
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
I removed it and it still didn't work. Weird!

Re: using different skins [Re: JazzDude] #127928
05/04/07 03:09
05/04/07 03:09
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
because "skin" is a reserved name. change it to something like this...

Code:

DEFINE _skin, my.skill60;
.
ACTION enemy
{
...
if (my._skin == 2){my.skin = 2;}
...
or
...
my.skin = my._skin;
...
}




xXxGuitar511
- Programmer
Re: using different skins [Re: xXxGuitar511] #127929
05/04/07 03:42
05/04/07 03:42
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Perfectly logical, but it still doesn't work. Maybe I should be looking elsewhere for the reason.

I checked the model. It has three skins "skin0","skin1" & "skin2"

I can't get the skin to change with a simple

my.skin = 1; or
my.skin = "skin1";

Well, here's a clue:

I gave one of the enemy this action from the manual and it works. He cycles the three skins.

Code:
action flipskins
{
while (1)
{
my.skin = my.skill1 % 3; // 3 Skins
my.skill1 += time; // 16 skins per second
wait (1);
}
}



That should tell me something.......but what?

Re: using different skins [Re: JazzDude] #127930
05/04/07 03:50
05/04/07 03:50
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
well I think you need to set your skill60 value in WED entity properties,otherwise the engine is defaulting it to 0 or 1 maybe.So depending on the enemy set skill60 to 1,2,3 as your case is.Also,I think you can set skills only upto skill50 and not skill60.

Re: using different skins [Re: zazang] #127931
05/04/07 04:00
05/04/07 04:00
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Hooray!! Success!

define _skin,skill16;

my.skin = my._skin;

Set the skin number in WED...and away we go!

Thanks, guys. You're the best.

Re: using different skins [Re: JazzDude] #127932
05/04/07 04:07
05/04/07 04:07
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Incidentally, this didn't work with skill 60 even tho the
manual says "Entity.skill51..entity.skill100 are free for the user."

Re: using different skins [Re: JazzDude] #127933
05/04/07 04:35
05/04/07 04:35
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
yes you are free to use every skill from 1 to 100( unless ur using templates) but you need to set skill60 value somewhere and in your case WED didnt allow that.
anyway its solved now so congrats


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1