It is currently Tue Jan 19, 2021 10:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Vehicle's ids and apemans experience points
PostPosted: Wed Aug 12, 2009 4:27 pm 
Offline
Soldier level 0
Soldier level 0
User avatar

Joined: Thu Apr 02, 2009 4:29 pm
Posts: 29
When I want to assign ID to a vehicle in SAIL writing simply
Code:
vehicleid=ComConstruct(units:plist chassis:integer engine:integer control:integer weapon:integer)

it doesn't return any error in SAIL, but the id isn't ascribed, the vehicle doesn't react when using it after vehicle's construction. I know that using it you can give the construction order to several factories, so that would cause an error, but if it's possible Stu, please implement it in the upcoming patch, because it would make SAILing a bit easier.
There's one more thing that needs your attention - dunno if it appeared earlier, but when I play the campaign with latest patch 1.10b installed apemans don't get promotion in their engineering skill despite that they have required point to advance. Also there's only one variable describing both points in fighting and engineering skill, so when they fight or build/repair/collect crates they gain points to one pool and advance only in fighting whatever they do.


Top
 Profile  
 
 Post subject: Re: Vehicle's ids and apemans experience points
PostPosted: Wed Aug 12, 2009 4:35 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
Yes, I know the apemen's bug.

And second, for your sail issue, you have to use filtering... ( vehicle=FilterAllUnits([[f_side,vehiclesidehere],[extra characteristic here].[... complete with more characteristics]]); )
Have the Constanst list handy, its in the downloads' section. And then you can use the linked variable for the unit as you'd do with an ID.
Tough, if there are more than 1 filtered unit assigned into the varible, then it passes to be a list, so if you want a special unit, it will be more difficult since according to Radzio, units filtered in a list are ordered randomly, and you'll have to re-filter the list again with more properties or use a FOR with each unit in the list and check for that special thing you want to check...
But yes, you need to use filters.

Good luck with it. :wink:

_________________
-Aleph.

THE Very active person

"You can only do well at something if you put the time in. Doesn't matter what subject it is. You can't make a master piece over night."
Wise man Stu-


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 4:52 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Ignore apemen but vehicle id assigning should work (at least it worked with some patches ago xD). Well, I'll try to find out if there is rly a problem.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 4:52 pm 
Offline
Soldier level 0
Soldier level 0
User avatar

Joined: Thu Apr 02, 2009 4:29 pm
Posts: 29
Yes I know, but if it would work I wouldn't have to use all those filters. Gothuk also had problem with it (he was first to notice it) and he had to use filters and lists to get around it. Function working that way (ascribing that id) would really make it all easier.

// written b4 Radzio's post xd


Last edited by Moonstrider on Wed Aug 12, 2009 4:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 4:53 pm 
Offline
Moderator
Moderator
User avatar

Joined: Mon Mar 17, 2008 6:03 pm
Posts: 1130
Location: Denmark
Moonstrider wrote:
When I want to assign ID to a vehicle in SAIL writing simply
Code:
vehicleid=ComConstruct(units:plist chassis:integer engine:integer control:integer weapon:integer)


it doesn't return any error in SAIL, but the id isn't ascribed, the vehicle doesn't react when using it after vehicle's construction.


You can't give a vehicle an ID before it's constructed (yet :P ), so as gwren1 said you have to use filters. One especially helpful constant could be f_distxy - a vehicle standing just outside a factory's entrance has a distance of 4 to the factory.

Code:
FilterAllUnits([f_distxy, GetX(factory), GetY(factory), 4]);


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:06 pm 
Offline
Moderator
Moderator
User avatar

Joined: Fri Jan 13, 2006 6:20 pm
Posts: 2325
Location: Argentina
So I won!!! xD

Radzio: Nope, u failed.

_________________
-Aleph.

THE Very active person

"You can only do well at something if you put the time in. Doesn't matter what subject it is. You can't make a master piece over night."
Wise man Stu-


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:06 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Don't use any filters, they would simply make it harder.

And sorry, I didn't see it was a Com... functions. These functions are like void in c++, they simply give no output.

Use an event according to vehicle construction: here is a good example, http://wiki.owsupport.com/index.php?title=VehicleConstructed

Gwren1: NoU.
Radzio: I won.


Last edited by Radzio on Wed Aug 12, 2009 5:21 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:14 pm 
Offline
Soldier level 0
Soldier level 0
User avatar

Joined: Thu Apr 02, 2009 4:29 pm
Posts: 29
McBenn suggested me a good idea. Iwrote a function:
Code:
Function ComConstructwithID(id,fact,cha,eng,con,wea);
Begin
ComConstruct(fact,cha,eng,con,wea);
end;
On VeicleConstructed(veh,fac) do
Begin
if GetChassis(veh)=cha and GetEngine(veh)=eng and GetControl(veh)=con ang GetWeapon(veh)=wea and fac=fact then
id=veh;
end;

If the event could be triggered within this function and if it could be disabled after it gives an id (just like 'every') then it would work. Additionally the event would have to be queued( if u give a few AddComConstructwithID for one factory) ;P


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:18 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Never gonna work. See the example on the page I posted link to.
If you want more units then simply use a list.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:20 pm 
Offline
Soldier level 1
Soldier level 1
User avatar

Joined: Mon Nov 26, 2007 8:07 pm
Posts: 86
Location: Germany
Radzio wrote:
Don't use any filters, they would simply make it harder.

And sorry, I didn't see it was a Com... functions. These functions are like void in c++, they simply give no output.

Use an event according to vehicle construction: here is a good example, http://wiki.owsupport.com/index.php?title=VehicleConstructed

Gwren1: NoU.
Radzio: I won.

hey! the thing that i wrote into the wiki :D
*proud*
I remember when i was checking the american mission...12 i think?
the one where russia makes the siberian bombs.
I got the code from the part where russia constructs vehicles :D
Anyway, im happy that people use it

Radzio: Yeah, but why u've mistaken the name in pagename? xD Just fixed that.

_________________
MEMORIES, A OWAR MOD, PLEASE TRY OUT


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:22 pm 
Offline
Soldier level 0
Soldier level 0
User avatar

Joined: Thu Apr 02, 2009 4:29 pm
Posts: 29
I know, I've already used it. But it m8 be quite hard when one will want to create many vehs and give them all ids. I just want to improve the editor.

// again - written b4 Trucker

Let's see what will Stu tell us.

// Radzio turn on ur gadugadu xD


Last edited by Moonstrider on Wed Aug 12, 2009 5:28 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 5:23 pm 
Offline
Original-War.Net Owner
Original-War.Net Owner
User avatar

Joined: Wed Jan 25, 2006 10:21 am
Posts: 2786
Location: Poland, Białystok
Give me an example of what u need it to and I'll tell u how to do it in a different (POSSIBLE!) way.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 12, 2009 9:11 pm 
Offline
OW Support Owner
OW Support Owner
User avatar

Joined: Wed Dec 28, 2005 11:13 pm
Posts: 5015
Location: UK, Scotland
As people // Radzio inline: Well, I'm proud u think of me as of people xD // have stated Com commands don't have return values. The events are there so that you can catch when things have been compleated/achived. Com commands could never have return values as the things they do are NOT instantly done by the game.

Altar managed fine with events, if you look at Altars maps you can learn how to do most things.

_________________
Image
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Original War is an RTS / RPG game by Altar Games
Original War Support is not part of Altar Games but is maintaining Original War for Altar Games

Privacy Policy