Project X Forums



It is currently Fri May 25, 2018 10:56 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: CCrate:: grab crate from far away ()
PostPosted: Sun Sep 25, 2016 12:00 am 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
Is there a way to make a crate be "grabbed" with code?
Only way that kind of works is delete the crate and then roll your own random weapon code with "AddWeapon();".
However i would like the scheme weapon crate chance% to be used. A good random weapon function would be fine also if someone has it.

Noticed the CCrate(obj)->desc.weapon .. amount .. etc. are all empty, i guess it randomizes after the crate is grabbed and then fills the values in after.
Found out that you can override CCrate::Free() to get the values but it is not useful for me since a worms need to touch it first.


Top
 Profile  
Reply with quote  
 Post subject: Re: CCrate:: grab crate from far away ()
PostPosted: Sun Sep 25, 2016 4:18 pm 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
There was a function GenerateContent(); inside CCrate that generated weapon to drop!
Had to store the found crate in a local CCrate* for some reason or else it didnt work.


Code:
           local wep = GS->GetWeaponByIndex(1, tmpCratep->desc.weapon-100);
           local wepindex = wep->GetWeaponIndex();
           
           GS->Info.AddWeapon(firstwormTeam,wepindex,tmpCratep->desc.amount);


Top
 Profile  
Reply with quote  
 Post subject: CCrate grab crate from far away
PostPosted: Sun Mar 04, 2018 2:28 pm 
Offline

Joined: Fri Nov 22, 2013 6:16 pm
Posts: 2
Location: Украина
Hi

I have some VPSs in different data centers, and I would like to move them to one DC, is it possible, and how can I do that?

_________________
Источник бесперебойного питания https://teplogazservice.com.ua


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

All times are UTC


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
Skin by Lucas Kane